Hi,
I've prepared a simple patch that adds support for unlimited file downloads to OpenCart 1.5.1 (it may probably for work for some of the older versions too). The changes are cosmetic - only three lines were actually changed.
The idea is to assign a negative number to download limit. If it is done, file downloads will no longer decrement the value of order_download.remaining column.
--
Edit: I've updated patch file. Previous one, due to mixed line endings, caused errors in patch program (at least in patch from UnxUtils and Cygwin).
Attachments
Unlimited downloads patch (fixed line endings issue)
Hi,
I have just tried implementing your patch and it is not working.
I am using version 1.5.4 and have made the changes in your patch but my downloads just show as -1 with no download link in the customer download section.
Do you know what needs to be changed to make this work with version 1.5.4? or am I doing something wrong?
Don't know why Opencart dont just build this feature in?
Cheers.
I have just tried implementing your patch and it is not working.
I am using version 1.5.4 and have made the changes in your patch but my downloads just show as -1 with no download link in the customer download section.
Do you know what needs to be changed to make this work with version 1.5.4? or am I doing something wrong?
Don't know why Opencart dont just build this feature in?
Cheers.
Hi,
Got it working! Had to change a line of code in the theme template so that it shows the download link if the value is greater than 0 or less than 0 but hidden if 0.
The file that needed changing is /catalog/view/theme/default/template/account/download.tpl
and the line of code is:
changed to:
Now just want to workout how to get it to display the remaining downloads as Unlimited instead of -1, will post if I work it out.
Hope this fix helps other people, thanks to the OP for the bulk of the code required.
Got it working! Had to change a line of code in the theme template so that it shows the download link if the value is greater than 0 or less than 0 but hidden if 0.
The file that needed changing is /catalog/view/theme/default/template/account/download.tpl
and the line of code is:
Code: Select all
Line 18: <?php if ($download['remaining'] > 0) { ?>
Code: Select all
Line 18: <?php if ($download['remaining'] <> 0) { ?>
Hope this fix helps other people, thanks to the OP for the bulk of the code required.
Just to update,
To get it to display Unlimited for the remaining downloads instead of a minus number such as -1 I changed the following line of code in the same file mentioned in my previous post.
changed to:
Thats all folks. Unlimited download option for 1.5.4 using default theme.
Hope someone finds this useful
To get it to display Unlimited for the remaining downloads instead of a minus number such as -1 I changed the following line of code in the same file mentioned in my previous post.
Code: Select all
Line 16 <div><b><?php echo $text_remaining; ?></b> <?php echo $download['remaining']; ?></div>
Code: Select all
Line 16 <div><b><?php echo $text_remaining; ?></b> <?php if ($download['remaining'] < 0) { echo "Unlimited"; } else { echo $download['remaining']; } ?></div>
Hope someone finds this useful

Hi,
I have just created a vqmod xml file for Unlimited Downloads providing an easier way to implement this.
As described in this post this has been tested on OpenCart v1.5.4 using the default theme, also vqmod v2.2.1
You can download the xml file from here http://109.203.120.0/~limitles/vqmod/
Again many thanks goes to the original OP.
Enjoy
I have just created a vqmod xml file for Unlimited Downloads providing an easier way to implement this.
As described in this post this has been tested on OpenCart v1.5.4 using the default theme, also vqmod v2.2.1
You can download the xml file from here http://109.203.120.0/~limitles/vqmod/
Again many thanks goes to the original OP.
Enjoy

Who is online
Users browsing this forum: No registered users and 3 guests