Page 1 of 8

[RELEASED] Product Downloads

Posted: Wed Mar 30, 2011 5:15 am
by bull5-i
With this modification you can associate files with a product which can be downloaded from the product page without making a purchase - so called free downloads. This is perfect for additional material to products, such as product manuals, datasheets, brochures etc.

Additionally, it enables adding downloads to OpenCart directly from a specified folder on the server (auto add feature). This way you can upload multiple files with FTP and have them added with just one click. This is especially useful for adding lots of files or files which are larger than PHP maximum file upload size limit.

In the admin panel you can associate downloadable files with the product as usual. Only files marked as "free" will show up on product page (in store front) and can be downloaded from there. You can mark products as "free" in the Downloads section (Catalog -> Downloads). On the same page you can add multiple files from a directory to the OpenCart download system with just one click.

On the product view page a new tab will appear (named Downloads, but the name can be changed) which contains the downloadable material.

  • enable/disable the product downloads modification
  • show/hide file size
  • show/hide date added
  • set downloads per page [added in v1.7]
  • display filename as link or display a separate "Download" link
  • control the visibility of the downloads tab (always visible or show only if there is something to download)
  • optionally require user login (hide download tab for users not logged in, or show a special note to indicate, that login is required) [added in v1.1]
  • show downloads without download link if login is required [added in v1.8]
  • customer class based download access [added in v1.3]
  • enable/disable auto add feature
  • select a custom directory from where to take the downloadable files
  • control which type of files are auto added
  • set the default maximum downloads allowed (does not affect free downloads)
  • mark auto added downloads as free
  • easy linking - associate a download with multiple (or all [added in v 1.5]) products on download edit page [added in v1.2]
  • make multiple downloads free/unfree with one selection [added in v1.3]
  • display file type icons [added in v1.4]
  • option to force file downloads instead of opening in browser [added in v1.6]
  • sort downloads by name or date on product page [added in v1.7]
Modification settings can be configured from module settings page (Extensions -> Modules)

Product Downloads can be bought from ... on_id=1738

Version 1.3.1 is compatible with OpenCart 1.4.9- and 1.5.0.x.
Version 1.5.0 is compatible with OpenCart
The latest version of the mod is 1.8.6 and it is available as a vQmod for OpenCart 1.5.1.x - 1.5.4.x.

Some screenshots:
Modification settings page

Admin panel, module settings, general tab - admin_module_settings_general.png (40.67 KiB) Viewed 15145 times

Product view

Store, product view - store_front_product_view.png (54.62 KiB) Viewed 17276 times

Product view with login required

Store, product view, login required - store_front_product_view_login_required.png (15.94 KiB) Viewed 15145 times

- edit 08.11.2012 - Version 1.8.6 released (fixed an output buffering error that could corrupt downloaded file)
- edit 02.11.2012 - Version 1.8.5 released (fixed undefined offset notice on file download)
- edit 17.10.2012 - Version 1.8.4 released (fixed large file download issue)
- edit 19.09.2012 - Version 1.8.3 released (fixed an undefined index notice when the download mask did not contain a file extension)
- edit 23.08.2012 - Version 1.8.2 released (fixed a pathinfo problem)
- edit 20.02.2012 - Version 1.8.1 released (fixed download links for logged in customers when login was required)
- edit 19.02.2012 - Version 1.8.0 released (added option to show downloads without link if login is required)
- edit 09.02.2012 - Version 1.7.1 released (fixed problem with access rights on download links)
- edit 09.12.2011 - Version 1.7.0 released (added option to set downloads per page & sort downloads by name or date)
- edit 05.11.2011 - Version 1.6.0 released (added option to force file downloads)
- edit 02.10.2011 - Added support for OpenCart version and realeased vQmod for OC 1.5.1.x
- edit 24.07.2011 - Added support for OpenCart versions and
- edit 20.07.2011 - Version 1.5.1 released (fixed a bug where free downloads were added to orders as regular downloads)
- edit 19.07.2011 - Added support for OpenCart version 1.5.1
- edit 06.07.2011 - Version 1.5 released (added easy linking to all products)
- edit 25.06.2011 - Version 1.4 released (added file type icons)
- edit 01.06.2011 - Added support for OpenCart version 1.5.0
- edit 11.05.2011 - Added support for OpenCart version
- edit 05.05.2011 - Version 1.3.1 released (fixed a bug where guest checkout was not available if shopping cart contained products with just free downloads)
- edit 13.04.2011 - Version 1.3 released (added customer class based download access)
- edit 04.04.2011 - Version 1.2 released (added easy linking feature)
- edit 02.04.2011 - Version 1.1 released (optionally require user login)

Re: [RELEASED] Product Downloads

Posted: Thu Mar 31, 2011 4:21 pm
by ptcole
can use supply this module so the customer only gets the download when they are logged in? no need to purchase the product just log in to get access?

Re: [RELEASED] Product Downloads

Posted: Sun Apr 03, 2011 12:51 pm
by pcmartkl
I had purchased Product Downloads (2in1) on 03 April 2011 and upload to , enable the modules but do not see download files in the catalog, products, Link tabs, Downloads.

I had upload pdf datasheet to downloads folder.

Re: [RELEASED] Product Downloads

Posted: Sun Apr 03, 2011 1:11 pm
by pcmartkl
Error below when click auto add download

Warning: scandir(/download/) [function.scandir]: failed to open dir: No such file or directory in /home/agilemsc/public_html/ on line 4Warning: scandir() [function.scandir]: (errno 2): No such file or directory in /home/agilemsc/public_html/ on line 4Warning: Cannot modify header information - headers already sent by (output started at /home/agilemsc/public_html/ in /home/agilemsc/public_html/ on line 27

Re: [RELEASED] Product Downloads

Posted: Sun Apr 03, 2011 2:10 pm
by bull5-i
Hi pcmartkl,

You have to provide the full path to the download directory, which in your case seems to be /home/agilemsc/public_html/

Re: [RELEASED] Product Downloads

Posted: Mon Apr 11, 2011 12:15 am
by connman
does this module only support default theme or can it support other theme? Cause i tried installing it to other theme template, the feature seems to generate undefined error fd_download and the download tab won't appear.

Re: [RELEASED] Product Downloads

Posted: Mon Apr 11, 2011 2:50 am
by bull5-i
Yes this mod can support other themes. Custom themes just need custom approach. As there are thousands of custom themes out there I cannot provide premodded versions or exact instructions for all of them. What you need to do, is change your custom theme according to the changes made to the default theme files.

Re: [RELEASED] Product Downloads

Posted: Wed Apr 13, 2011 2:26 pm
by bull5-i
Some additional screenshots

Download form

Admin panel, download form - admin_download_form.png (38.06 KiB) Viewed 17192 times

Download list

Admin panel, download list - admin_download_list.png (15.08 KiB) Viewed 17693 times

Product edit page (links)

Admin panel, product edit page - admin_product_edit_links.png (25.34 KiB) Viewed 17693 times

Re: [RELEASED] Product Downloads

Posted: Thu Apr 21, 2011 7:28 am
by adriankoooo
It is possible to use this extension on it's own page? I want a global download page on my site. :)

Re: [RELEASED] Product Downloads

Posted: Thu Apr 21, 2011 12:25 pm
by bull5-i
Currently no, the downloads are strictly tied to products.

Re: [RELEASED] Product Downloads

Posted: Fri Apr 22, 2011 6:02 am
by JonnyW

Thanks for the module, it's exactly what I was looking for.

Now the questions :)

Is there any way of adding a download from an individual product page? At the moment it seems I have to go to downloads, uplaod the product then select the associated product from a the box below. It'd be far easier when adding the product to have a upload box that says 'Which files to you want to upload and associate with this product?' - is this something you'd consider for a future release?

Also, it'd be great to see an filetype icon to the left of the filename for the more popular formats.

Thanks for the module!


Re: [RELEASED] Product Downloads

Posted: Fri Apr 22, 2011 12:50 pm
by bull5-i
Hi Jon

Glad to here that you like the mod.

The current solution is built upon the OC own downloads system. Adding a download upload section to product insert page should be possible, but would be reduntant to OC own downloads system. You can always add multiple free downloads to OC before adding a product and then on the product insert page link them. Currently I'm not very eager to write redundant code :)

Filetype icons for most popular file formats is something that I might consider for a future release.

Thank you for your feedback

Re: [RELEASED] Product Downloads

Posted: Fri May 06, 2011 1:47 am
by JonnyW

If i add a product with a downloadable document on its product page to the cart, guest checkout is disabled.

Could you please advise as client needs both downloadable documents attached to products as well as guest checkout option and it seems Opencart classes the product as a downloadable product if I use this extension., base theme.



Re: [RELEASED] Product Downloads

Posted: Fri May 06, 2011 2:40 am
by bull5-i
This is indeed an unwanted behaviour. Just something I did not foresee nor stumble upon while testing. I will include the fix in the next release.

Thanks for pointing that out.

-e- bugfix version released

Re: [RELEASED] Product Downloads

Posted: Fri May 06, 2011 5:08 am
by JonnyW
Thanks for the fast response! Sorry to be a pain in the arse but could you give any indication at all as to when this might be patched?


Re: [RELEASED] Product Downloads

Posted: Fri May 06, 2011 1:04 pm
by bull5-i
Actually patched it yesterday and sent some instructions to you via private message (so check your inbox).

Re: [RELEASED] Product Downloads

Posted: Thu Jun 02, 2011 12:50 am
by bull5-i
Added OpenCart 1.5.0 support

Re: [RELEASED] Product Downloads

Posted: Sat Jun 25, 2011 11:22 pm
by bull5-i
Version 1.4.0 released (for OC - and This adds filetype icons.

Modification settings page [icons tab]

Ad min panel, modification settings, icons tab - admin_module_settings_icons.png (26.41 KiB) Viewed 17353 times

Re: [RELEASED] Product Downloads

Posted: Fri Jul 01, 2011 2:53 pm
by perk
Hi bull5-i

I just installed v1.4.0 on OC

I have 2 comments:

1. The icons are not showing. They are all pdf,but I can't get the icon to show.
2. The file sizes of the downloads say ccc KiB (kilobytes) and xxx MiB (megabytes) - the "i" is a mistake?

Re: [RELEASED] Product Downloads

Posted: Fri Jul 01, 2011 5:18 pm
by bull5-i
Hi perk

Thank you for your valuable comments.

The answers to your questions:

1. Thanks for bringing this to my attention. It seems that the version archive was missing one modified file. I have re-uploaded the module to OpenCart I will aslo PM you the file.

2. This actually is not a mistake. The "i" needs to be there to be politically correct if I may say so. All SI prefixes for binary multiples have the "i"-s. See this link for explanation.
My module calculates the file sizes on a binary base (2^10 = 1024) as opposed to a decimal base (10^3 = 1000). I know that vast majority of people use the prefixes in wrong context, they think that 1 MB (megabyte) is 1 048 576 bytes when actually it should be 1 000 000 bytes, because 1 MiB (mebibyte) is 1 048 576 bytes.

If, however, you'd like to use the MB-s and KB-s instead the correct ones or you'd like to calculate file sizes on a decimal base, you'd have to modify the catalog/controller/product/product.php file.

Hopefully I've brought some clarity to the matter.