How to refresh the page after downloading

Viewing 6 posts - 1 through 6 (of 6 total)
#68969

George
Member

Hello,

I handled download action like this:

onclick=”location.href='<?php echo site_url(); ?>/download/download-2/?wpdmdl=<?php the_field(‘downloads’); ?>’;return false;”

There is also PHP script to check the number of downloads for user, and if it’s >3 then download buttons are hidden.

The problem is – if the page doesn’t get refreshed after download, then downloads number stays the same, and users have option to download unlimited number of times.

Any idea on how to setup page refresh after download is done?

Many tnx

#69000

You can use jquery to check the click function. Then reload the page or increase the count.
Also, We have default download limit with the package settings. Do you have the issue with that option?

Thanks

#69095

George
Member

Tnx for answering.

I don’t use default Download limit add-on. Would I be able to use it to set a limit reset time on a specific date retrieved from the database?

#69183

Hi,

Actually, you can set a reset limit with our Download limit addon. But for this instead of date, we use day count. Which should have solved the same issue.

Thanks

#69212

George
Member

Tnx for helping me. I’m afraid it won’t work as expected.

Are days being count from the day user registered / got a specific user role assigned?

In that case, the problem may occur if the user renew his membership (the role stays) on let’s say 25th day, but days will reset on 30th.

#69289

Sorry, That option not possible yet. But noted for future implementation. Or if you need the customize solution you can send details to customize@wpdownloadmanager.com

Thanks

Viewing 6 posts - 1 through 6 (of 6 total)

The topic ‘How to refresh the page after downloading’ is closed to new replies.