Limit Downloads To # Of Hrs Or # Of Attempts?

HomeSupportImage StoreLimit Downloads To # Of Hrs Or # Of Attempts?

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #71957
    jcharris
    Participant

    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 or

    b) 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

    #71982
    jcharris
    Participant

    To 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.

    #78240
    Xpark Media
    Keymaster

    @jcharris,

    I 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.

    #78979
    jcharris
    Participant

    OK, 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.

    #98320
    Xpark Media
    Keymaster

    1. 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’.

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.