Site maintenance: Sun 15 Nov, from 12:00 UTC, about 4–6 hours. Details

This cutover relies on some testing that is still incomplete so may be cancelled at short notice

Forums / General Questions / Setting all downloads to not expire

Setting all downloads to not expire

Started by caroleas on 4 Sep 2025, 1:49 PM · Views: 474

Results 1 to 9 of 9
4 Sep 2025, 1:49 PM
#1
caroleas avatar

caroleas

Totally Zenned

Join Date:
Feb 2009
Posts:
896
Plugin Contributions:
0

Setting all downloads to not expire

In my store, I offer digital downloads of scripts for PaintShop Pro. To me, there is no need to limit the duration of the downloads. I have no reason for the links to expire.

For now, I set the Expiry Days to 0 (which should be unlimited), but it does not always behave that way, as occasionally, some people will email me because their download link expired. Is that the incorrect way to go?

Also, is there a way to set that 'unlimited' number of days for ALL past products? If so, how?

24 May 2026, 12:56 AM
#2
caroleas avatar

caroleas

Totally Zenned

Join Date:
Feb 2009
Posts:
896
Plugin Contributions:
0

Re: Setting all downloads to not expire

I know this is an older post, but I wonder why my links still expire.
I always set the expiring to 0 (unlimited), however, customers still email me because their links have expired. Is there something else I should do?

25 May 2026, 2:00 AM
#3
barco57 avatar

barco57

Totally Zenned

Join Date:
Apr 2006
Location:
West Salem, IL
Posts:
2,846
Plugin Contributions:
0

Re: Setting all downloads to not expire

It is because the download max days are stored on an order-by-order basis.
So only new orders will get the new setting. Existing orders have the settings that were set at the time of their order.
You would have to go into the orders_products_download table and set the download_maxdays column to 0 for every order.

Mike
AEIIA - Zen Cart Certified & PCI Compliant Hosting
The Zen Cart Forum...Better than a monitor covered with post-it notes!

25 May 2026, 11:53 AM
#4
caroleas avatar

caroleas

Totally Zenned

Join Date:
Feb 2009
Posts:
896
Plugin Contributions:
0

Re: Setting all downloads to not expire

barco57:

It is because the download max days are stored on an order-by-order basis.
So only new orders will get the new setting. Existing orders have the settings that were set at the time of their order.
You would have to go into the orders_products_download table and set the download_maxdays column to 0 for every order.

Why would it be "per order" if I need to enter the number of days until expiration when I set up individual products?

But what you describe does not really happen. For example, I had a big sale in April. All the products are already set for 0 days to expiration, yet, some customers emailed me since, while they didn't have time to download their large purchase immediately, saying that now, some products are expired (not all).

I have been setting the download expiration when I upload my products in the store for a couple of years now. And I had someone change all the previous products to not expire, but they still do.

25 May 2026, 1:36 PM
#5
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,897
Plugin Contributions:
21

Re: Setting all downloads to not expire

In your Admin > Configuration > Attribute Settings, are Download Expiration and Number of Downloads Allowed both set to zero?

Also, make sure your three settings for Downloads Controller are set properly to match your payment module. If you have created a different status, it may not match what's in the admin config.

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com

25 May 2026, 5:42 PM
#6
caroleas avatar

caroleas

Totally Zenned

Join Date:
Feb 2009
Posts:
896
Plugin Contributions:
0

Re: Setting all downloads to not expire

dbltoe:

In your Admin > Configuration > Attribute Settings, are Download Expiration and Number of Downloads Allowed both set to zero?

I have the Download Expiration set to 0 but why would I set the Number of downloads Allowed to 0?

dbltoe:

Also, make sure your three settings for Downloads Controller are set properly to match your payment module. If you have created a different status, it may not match what's in the admin config.

I am using the default values for all those.

25 May 2026, 7:23 PM
#7
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,897
Plugin Contributions:
21

Re: Setting all downloads to not expire

You are correct. Should have just been Download Expiration.

You didn't let us know all the deets the posting tips ask for. Mind telling us version, PHP, mods, etc?

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com

25 May 2026, 7:32 PM
#8
caroleas avatar

caroleas

Totally Zenned

Join Date:
Feb 2009
Posts:
896
Plugin Contributions:
0

Re: Setting all downloads to not expire

dbltoe:

You are correct. Should have just been Download Expiration.

You didn't let us know all the deets the posting tips ask for. Mind telling us version, PHP, mods, etc?

Sorry for missing those details.
I am using v1.5.7c
PHP Version: 7.4.33 (that is what shows in the zencart backend (even though on my host panel it is set to PHP 8.3)
As for mods, i have a few but mostly for language, one-page checkout, and Stripe.

Would this help?

26 May 2026, 11:08 AM
#9
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,134
Plugin Contributions:
56

Re: Setting all downloads to not expire

barco57:

It is because the download max days are stored on an order-by-order basis.
So only new orders will get the new setting. Existing orders have the settings that were set at the time of their order.
You would have to go into the orders_products_download table and set the download_maxdays column to 0 for every order.
Right, it has nothing to do with the number of downloads allowed.

To set downloads as "unrestricted" for all ordered products (once you've set Attribute Settings :: Download Expiration (Number of Days) to 0 (no limit)), you can copy/paste this into your admin's Tools :: Install SQL Patches (after you've created a backup of the database):

UPDATE orders_products_download SET download_maxdays = 0;