Results 1 to 7 of 7
  1. #1
    Join Date
    Jul 2006
    Posts
    31
    Plugin Contributions
    0

    help question 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.

  2. #2
    Join Date
    Sep 2004
    Posts
    745
    Plugin Contributions
    4

    Default 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
    Code:
    <a href="pdf/document.pdf">PDF Document</a>
    to point to the *.pdf.

    Hope this helps!

    Jeff

  3. #3
    Join Date
    Jul 2006
    Posts
    31
    Plugin Contributions
    0

    Default Re: File attachment to products

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

  4. #4
    Join Date
    Jul 2006
    Posts
    31
    Plugin Contributions
    0

    Default Re: File attachment to products

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

  5. #5
    Join Date
    Nov 2006
    Posts
    28
    Plugin Contributions
    0

    Default Re: File attachment to products

    Quote Originally Posted by eccentric View Post
    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

  6. #6
    Join Date
    Jul 2006
    Posts
    31
    Plugin Contributions
    0

    Default 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.
    Attached Images Attached Images  
    Last edited by eccentric; 8 Jan 2007 at 05:55 AM.

  7. #7
    Join Date
    Nov 2006
    Posts
    28
    Plugin Contributions
    0

    Default 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 :)

 

 

Similar Threads

  1. v139h Attribute file not being sent as an attachment with order
    By RescoCCC in forum Setting Up Categories, Products, Attributes
    Replies: 4
    Last Post: 1 May 2015, 07:20 PM
  2. How to add file attachment option on a product?
    By jcrewe in forum Setting Up Categories, Products, Attributes
    Replies: 2
    Last Post: 10 Aug 2011, 03:06 PM
  3. Attachment form?
    By bayshorecreations in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 6 Jan 2011, 11:22 PM
  4. Emailing an attachment
    By enquirer66 in forum General Questions
    Replies: 1
    Last Post: 14 Aug 2010, 05:00 AM
  5. Code Needed For File Attachment Upload with PHP Form
    By bumba000 in forum General Questions
    Replies: 0
    Last Post: 28 Mar 2007, 07:40 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR