Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Add files to Product


abebakker

Recommended Posts

Posted

Add file to Product

 

It would be great if it was possible to add files to product. I have for example for almost every product an productfolder (Pdf or DOC). It can also be useful for drivers, handbooks etc.. I want to add it to the product so customers can download them.

Posted

You can do this as an attribute - download the MS2 documentation - I think there is an explanation in there (download link under 'Solutions' in the forum header bar)

 

Matti

Posted

The simplest way would be to edit the categories.php file and the product_info.php files, the first so you can upload and add the file to the product, the second so it is displayed along with the product. I would stay away from using the attributes to deal with this as the attributes are tricky files to work with, and it could be done much easier in the products editing tool. This is if you are planning to offer the file for free, if you are selling the file along with the product, then the attributes is the only way at present to go ...

 

 

 

cheers,

Peter M.

Peter McGrath

-----------------------------

See my Profile (click here) for more information and to contact me for professional osCommerce support that includes SEO development, custom development and security implementation

Posted

Is there any chance you could elaborate a bit more on what you would edit in Categories and product_info to allow downloads.

Posted

Sort of, the basics I would add in are the following:

 

In the product editing portion of the catalog.php file, add in a new file upload field, so it graps a file you want associated with the product. Add in a new DB field in the products table (call it file_download) now that you have the file being saved with the product, it is a simple thing to display it on the product_info.php page, I would suggust you link to it via a new window though, so the file download opens up in a new window for people to download directly.

 

I do not have the time to go through all of the code changes to implement this, but they are not extensive, for the file upload part, look at how the product images are handled in the category.php file, which is most of the work anyways....

 

cheers,

Peter M.

Peter McGrath

-----------------------------

See my Profile (click here) for more information and to contact me for professional osCommerce support that includes SEO development, custom development and security implementation

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...