Results 1 to 3 of 3
  1. #1
    Join Date
    May 2013
    Posts
    38
    Plugin Contributions
    0

    image problem Where are file uploads handled?

    For my store, I'm creating an optional file upload form for artwork after a customer has made a purchase. Thus far, I have edited the define_checkout_success.php with an upload form (I am using the CSRF token with the upload form). I have created an attribute for file upload for a product to do research and learned that the "number_of_uploads" get paramater is set to 1 for this specific product when submitting the form.

    I can't seem to find where the process happens after that point. The file is uploaded, I can see it on my server and the database gets updated. I would like to use the same function that handles the process here (after adding a product to the cart) that's obviously already built into Zencart for my optional artwork upload.

    So, I'm pretty sure I could just set the action of the form to a specific pages that already handles file uploads, but I can't seem to get everything in line.

    Thanks for any information.

  2. #2
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: Where are file uploads handled?

    There is no built-in support for uploads on the checkout_success page.

    The cart is designed to have customers select their uploadable files (in your case, the "artwork") on the product page via a "File" attribute which you've added to that product. They select the file before adding the product to their cart, and then the file is uploaded when adding to cart and then stored and linked to the order when the purchase is completed.
    Changing that will require you writing your own additional custom code to be a whole new page to handle unrelated uploads, and then find a way to link them back to the order.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  3. #3
    Join Date
    May 2013
    Posts
    38
    Plugin Contributions
    0

    Default Re: Where are file uploads handled?

    I thought as much, but I figured I might ask to see if anyone else got a to file upload using this method:

    Quote Originally Posted by DrByte View Post
    They select the file before adding the product to their cart, and then the file is uploaded when adding to cart . . .
    Because that functionality works fairly well, is already implemented, and is mostly hidden (and would be less code for me to write/keep up with!).

    Thanks.

 

 

Similar Threads

  1. When customer uploads file for attribute where does it go?
    By dat311 in forum General Questions
    Replies: 1
    Last Post: 17 Aug 2011, 01:06 PM
  2. Where are account_edit and account_password post data handled?
    By Metallion in forum General Questions
    Replies: 2
    Last Post: 8 Oct 2010, 02:49 PM
  3. customer uploads - where are they?
    By WebDi in forum Setting Up Categories, Products, Attributes
    Replies: 3
    Last Post: 19 Jul 2010, 05:39 AM
  4. File uploads are disabled in the php.ini configuration file
    By stanleymog in forum General Questions
    Replies: 2
    Last Post: 19 Aug 2008, 01:24 PM
  5. Replies: 5
    Last Post: 15 Jan 2007, 06:23 AM

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