Bring Your Business to Life › Support › Image Store › Limit Downloads To # Of Hrs Or # Of Attempts?
Tagged: sort download images
- AuthorPosts
- April 2, 2014 at 1:58 pm #71957jcharrisParticipant
Hi,
When someone makes a purchase we would like to somehow limit this. Either
a) They get 3 attempts to download and then the download link disappears orb) They get a time period (say 24hrs) after completing their order to download.
Can you suggest the best way to do this?
Of course, I can add that data to user_meta along with order history… or I can create a new table, but I wanted to check to see if you already had plans for a future system so we would remain compatible.
TIA,
—JC
April 2, 2014 at 2:29 pm #71982jcharrisParticipantTo clarify: the issue is that the customer may order 30 images, but we need to track their download attempts by each IMAGE on the order… not by the order date.
April 8, 2014 at 12:50 am #78240Xpark MediaKeymasterI does make sense to limit the downloads by count or time. We will add this to future development.
It will take sometime, if you need to make it work on your site we suggest to add an additional custom field to the order (ims_order post type) and to use the plugin hooks.
April 8, 2014 at 4:32 pm #78979jcharrisParticipantOK, can you suggest which hooks to use?
1. It looks like I could add a field to the cart array stored in ‘_ims_order_data’ in wp_postmeta. Is it possible to do this without hacking the ImageStore core? If so, which hook should I use?
2. Then, which hook do I use to update that field? I’ll need to update this wp_postmeta every time the visitor clicks the ‘Download’ button.
I just want to know if I can do this without hacking the core. If that’s not possible, fine, but I’d like confirmation before I do that.
April 26, 2014 at 11:06 pm #98320Xpark MediaKeymaster1. you can use the “ims_pre_get_customer_images” filter to modify or add additional arguments to the WP_query use to get the customer images.
2. To keep track of the of the image downlaoded use “ims_apply_color_filter” we are going to add a new hook on the next release called ‘ims_image_download’.
- AuthorPosts
- You must be logged in to reply to this topic.