Zen Cart Logo
Forums / All Other Contributions/Addons / File attachment to products

File attachment to products

Locked

Views: 3,022

Results 1 to 7 of 7
This thread is locked. New replies are disabled.
23 Nov 2006, 3:37 AM
#1
eccentric avatar

eccentric

New Zenner

Join Date:
Jul 2006
Posts:
31
Plugin Contributions:
0

File attachment to products

Hi,

I've done a bit of searching on the forums about this but couldn't find anything, so apologies if it's covered somewhere.

I need to be able to upload and attach a PDF to each of my products, that can be downloaded by visitors. The PDF contains product specifications (including images and a lot of text - far more than you could fit in the description field). Does such a mod exist? Cheers.

23 Nov 2006, 3:55 AM
#2
jeffd avatar

jeffd

Totally Zenned

Join Date:
Sep 2004
Posts:
605
Plugin Contributions:
1

Re: File attachment to products

Each product allows a Products URL (a field which you could use to point to the *.pdf file).

You would probably want to create a directory (say, named pdf) inside your catalog directory to house the documents you upload, then path them properly in the Products URL. A link is then shown in the product info.

If this won't work for you (perhaps you're already using the Product URL for something else) just add to your product description ```
<a href="pdf/document.pdf">PDF Document</a>


Hope this helps!

Jeff
23 Nov 2006, 11:42 PM
#3
eccentric avatar

eccentric

New Zenner

Join Date:
Jul 2006
Posts:
31
Plugin Contributions:
0

Re: File attachment to products

Alright, looks like I'll have to write the mod myself then. Thanks for the tip!

24 Nov 2006, 12:14 AM
#4
eccentric avatar

eccentric

New Zenner

Join Date:
Jul 2006
Posts:
31
Plugin Contributions:
0

Re: File attachment to products

P.S. I think this (file upload for attachments to products) should be a standard feature.

30 Dec 2006, 10:23 PM
#5
buzzy avatar

buzzy

New Zenner

Join Date:
Nov 2006
Posts:
28
Plugin Contributions:
0

Re: File attachment to products

eccentric:

Alright, looks like I'll have to write the mod myself then. Thanks for the tip!

Hi! I just wanted to ask, if you have got this mod written (or found somewhere)? I need to have this feature for pdf also...

Buzzy

8 Jan 2007, 4:51 AM
#6
eccentric avatar

eccentric

New Zenner

Join Date:
Jul 2006
Posts:
31
Plugin Contributions:
0

Re: File attachment to products

I ended up writing it myself, yes. But unfortunately it's not something I could just put up here for people to download and use - reason being that due to the way I wanted the file upload to work (as a field on the product edit page - see attached image) I had to hack a few core files.

If I had more time I'm sure I could 'package' it but unfortunately free time is something I have very little of and what little I have I don't like to spend in front of a computer.

If you have some PHP skills I'm sure you could work it out, all I did was (essentially) copy much of the code used for the 'product image' and modify it to instead be used as 'product attachment'. I also had to copy the database fields used for the 'product image' and again use them for 'product attachment'. Start by editing:

/admin/includes/modules/product/collect_info.php
/admin/includes/modules/product/preview_info.php
/admin/includes/modules/update_product.php

Good luck.

17 Jan 2007, 5:56 PM
#7
buzzy avatar

buzzy

New Zenner

Join Date:
Nov 2006
Posts:
28
Plugin Contributions:
0

Re: File attachment to products

I understand you very well. I got it working with the product url, but I'm gonna eventually do the same thing as you did with the files... all I need is time and fresh coffee :)