Adding Downloadable Item to Product in Opencart Store

Opencart is a open source online store with everything that you could need built right into it so you basically just plug and upload and play.

I assume you’re already there, and now you want to add a product to your store that is downloadable, like an e-book or photograph.

Now, the problem here is that you don’t want it available to the client until they pay for it.

Not to worry, Opencart has you covered. The process goes like this.

  1. Upload the file you want available to download to your site, by going Catalog -> Downloadsdownloads-opencart-2
  2. Add the Download Name of your choice, this will show up on the product page later.
  3. Click the upload button, and it should open up a File Open box to select the file you will want to make available for the user to download after they’ve paid for the file.If this doesn’t work (some files are to large for the browser to upload due to server restrictions) you’ll need to upload the file directly to your website via FTP.

    If you have to upload via. FTP, you upload it to the Downloads folder, which is located in the root of your store. After you upload the file here, you simple enter the file name (with extension) into the box next to the upload button. So, you’d just enter “uploadedfile.pdf” into the box.

  4. Fill out mask if you wish, I think it’s supposed to confuse people about how the name of the file so they cannot hack your store and download the product for free.
  5. Once everything is filled in as you like, click Save in the upper right corner of the page.
  6. Now, you need to enter in your product just as you always do for the rest of your products (Catalog -> Products).
  7. On the Links tab at the top of the new product page, halfway down the page, you’ll see Downloads, and it should also show the new download file you just uploaded. Select that product.
  8. Once the rest of your product data is entered as you desire, click Save in the top right.
  9. Do happy dance.

NOTE: In Opencart, the download won’t be available until after the customer pays for the product.

Hope this helps!

Thanks to Opencart Turorials for their article which helped with this.

17 Comments

  1. Open cart developer May 11, 2013 2:27 am  Reply

    Someone essentially help to make seriously posts I would state. This is the very first time I frequented your web page and thus far? I amazed with the research you made to create this particular publish amazing. Great job!

    • ned May 12, 2013 11:01 pm  Reply

      Hope it helped!

  2. vikas February 5, 2014 10:28 pm  Reply

    Hello frends,
    Is there any way to make link to download pdf, without pay for product. on open cart??

    • ned March 4, 2014 6:05 pm  Reply

      Vikas, perhaps you could just make the product for free? I think there is also an option to enable downloading the product without paying for it.

      This OpenCart Community forum topic will probably give you a solution: http://forum.opencart.com/viewtopic.php?t=53705

  3. Venkat March 28, 2014 4:14 am  Reply

    hi this is rajesh
    i have fridaybazaar.in with opencart and i do have few Queries
    we are selling computer and laptops on fridaybazaar
    my query is i want to display compatibility for a laptop or desktop in product page , please guide me anyone to short out this problem
    website Details: http://fridaybazaar.in
    thanq in advance

    • Ned April 3, 2014 10:57 am  Reply

      Venkat, what type of compatibility are we talking about? Are you looking for compatibility with software packages, or with other things for sale in your store?

      I should think that either way this can be taken care of in the description section of the product, and also the related products section.

      Cheers, ned

  4. Razzi July 27, 2014 3:32 pm  Reply

    Worked as a charm for me, THANKS!!

  5. Jannie October 19, 2014 8:51 pm  Reply

    Hi, i have used the above method for downloadable product, however when i tried to purchase and download the zip file as a user, the file appear to be a broken link, it doesn’t show is a zip file. May i know what’s wrong with it? Thanks.

    • Ned October 24, 2014 6:04 pm  Reply

      Hello Jannie. I’m not sure the file you’re uploading, or the security of your server you’re using. Or the encryption method (if any) used for files uploaded to your server. This would require some extensive debugging. If you would like me to take a look at it, please contact me via email.

  6. Amirhossein November 11, 2014 3:07 am  Reply

    Hello everybody ,

    I want sell downloadable product , but want upload those files at another host , How can I do ?
    shop -> Host A ( In Server AB )
    Upload Center -> Host B ( In Server CD )

    Please help me .
    Thanks.

    • Ned November 11, 2014 7:32 pm  Reply

      Dear Amirhossein. Are you planning on a lot of downloads to happen of this file, or do you only expect a few? There are some options, which vary in automation. The easiest, but least automated, is to simple get an email every time somebody buys the product, and then email the buyer the new link. Next, you may want to consider adding the link into a confirmation of purchase email that gets sent to the buyer. Be careful here as you most likely only want to send out the link to the downloadable product to the person that bought the product, not every single person who buys stuff from your store. The last option I can think of off the top of my head is to modify the link of the downloadable product as desired. This new link should be the link you get when you ‘right click -> save file as’ on the file in your Upload Center. I think Magento also allows you to add custom text to your Product that displays after a user buys the product. It might also be an option to add this ‘save file as’ link here. \

      I’d like to mention that Magento has built in security features for ‘download-only-once’ that avoids multiple downloads with the same link, etc.

      Good luck!

      • Amirhossein December 1, 2014 11:53 pm  Reply

        Hi dear Ned,
        thank you for your attention ,

        I say again my problem :
        I have a host plan as low option ( 450MB space ) but have any e-books as large size ( Over 40MB )

        And have anther hosting as low option ( 30GB space but No SQL database ) ,

        Now I want uploading e-books on 30GB host plan and sell them in shop ( 450MB host plan ) .

        I cant’s create once time download link in second host

        • Ned January 29, 2015 11:19 pm  Reply

          Dear Amirhossein, sorry for the long reply. I’m afraid, aside from the few solutions that I gave you in the previous post, that I have no solutions for you – only some more thoughts.

          I am going to assume you’ve tried using the URL to the file on 30GB server in the product download location? I don’t think you’d be able to do this without having a server on the 30GB server though. It is fairly straight forward to install a mySQL db (my preference) on a server though…

          I am also assuming that the two host plans are virtual cloud based plans, and not local to your system. If they were local, you could map them together. If they’re hosted in your same AWS account, you can still map them together. But, if they’re hosted by two different hosting companies, you will have a harder time to map them together, but that is an option too..

  7. roks March 12, 2015 10:34 pm  Reply

    hi dear,
    i have problem in opencart for large file download product,
    when i am download 120MB file its working fine but download 240MB file firefox give the error message “The connection was reset” and crome gives error message “No data received”.

    so whats the problem..??

    I have face this problem from long time.
    Pls help me

    • Ned May 11, 2015 6:01 pm  Reply

      Roks, this sounds like it’s a server problem. Many servers have max-download-file-size limits set in them. Depending on the server instance type, you’ll most likely have to change this value in the PHP.ini file, and the HTTP server config files too.

  8. Ramesh June 4, 2015 9:36 pm  Reply

    Hi ,
    i want to add download button of product’s PDF near product’s add to cart button in product page.
    so ,how can i dp this.
    please reply me as soon as possible

    • Ned June 7, 2015 11:13 am  Reply

      Hello Ramesh.

      Doing this kind of bypasses any need to ‘add to cart’ your product, since they’ll be getting it for free with a ‘download now’ button there.

      But, if you really want to do this, one place to start is, when you’re making the product, selecting the option to ‘allow downloads without a purchase’. If you’re in luck, the product will then show up to be downloaded before the customer buys it.

      Another solution is upload the PDF either to the product or to a media folder located somewhere on your site/server, and then in the product description put a link (using target=”_blank” ) to the PDF that they desired. This isn’t really an elegant solution if you have a LOT of products and will be doing this to a lot of them.

      Finally, you might want to consider a custom plugin for downloadable products, or an archive page of all the PDFs you’re making available and providing a link to that in your product description.

      Hopefully this gives you some ideas!

Leave a Reply

13 − 1 =