Question

Is there a way to set the time for which a purchased downloadable product is valid?

Let's say, I have a downloadable product on my customer account, and this is valid until some specific date.

Thanks for your collaborations or ideas

Was it helpful?

Solution

By default, Magento provides an option to set the number of times the user can download the product. There is no option to set expiry date/time by default.

If you want to set a date/time limit and want to expire the link after that, you need to write a custom module for that.

Steps to achieve what you want are:

  • Create setting (under System > Configuration section) in the module for expiry (number of days) or create a custom product attribute for only downloadable products (you can do it from admin panel).
  • Set a cron in your module which will run daily and check the expiration date by adding expiration days to purchase date (for each order in which a downloadable product is ordered and the download link is active yet). If the current date is bigger than or equal to the expiration date, set the link to be inactive.

I hope my answer is clear enough to understand.

If not, you can check this extension.

OTHER TIPS

You can test this extension link listed below for your issue.

I think it will help you with your issue.

But, You have to do some changes in this extension to make it specific for your downloadable products only and as per requirement.

https://github.com/otecco/magento-product-expiration

We have used one of the extensions for our Magento 2 website but we are not sure if they cover downloadable products or not. We sell food / supplement product with limited shelf life and this product works very well for us. You can check the link below and ask the extension developer if they support this feature

Product with expiry date

Good luck!

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top