Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1
    Join Date
    Apr 2007
    Posts
    86
    Plugin Contributions
    0

    Default Upload script during checkout

    Is there any way to add a feature to allow the customer to upload a file during their checkout?

    For example, if my site is for an image modification service, the customer will select the service they want to purchase, check-out, and upload their original image during the checkout process or immediately after.

    I know they can just "email it to me" after they pay for the service, but that is no good! I need the file to be uploaded as soon as they pay. Also, it would be great if the files could be associated with their account.

    Is there any way to do this? Or would someone be interested in making this work?

    Please please please help. Thanks!

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

    Default Re: Upload script during checkout

    Add a FILE attribute, and they can upload it when the add the service to their cart.
    https://www.zen-cart.com/tutorials/index.php?article=57
    .

    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
    Apr 2007
    Posts
    86
    Plugin Contributions
    0

    Default Re: Upload script during checkout

    I read that page, and I went in to try it out. I think I'm missing something. Can you kinda do a step by step?

    Where does the file go when they upload it?

  4. #4
    Join Date
    Jan 2004
    Posts
    66,444
    Plugin Contributions
    279

    Default Re: Upload script during checkout

    The FILE Option Type for attributes is discussed on page 181 of the eStart Your Web Store With Zen Cart user's manual.

    Simply choose FILE for the Option Type when setting up the attribute components, and the customer will see a box to enter the name of the file they wish to upload from their computer. It's not really much different from using a TEXT Option Type to allow input of words, or a DROPDOWN Option Type to allow selection from a few possible choices via a pulldown menu.

    The files are uploaded to the /images/uploads folder on your server, whose permissions need to be set to Writable (ie: usually 777). The files will be renamed numerically, for the protection of your server and hosting account, so that people cannot upload rogue files and arbitrarily execute them.
    .

    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.

  5. #5
    Join Date
    Apr 2007
    Posts
    86
    Plugin Contributions
    0

    Default Re: Upload script during checkout

    Thank you for your help.

    What if the file is of a different type? I keep getting this message:
    "Error: File type not allowed. - jpg,jpeg,gif,png,eps,cdr,ai,pdf,tif,tiff,bmp,zip"

  6. #6
    Join Date
    Jan 2004
    Posts
    66,444
    Plugin Contributions
    279

    Default Re: Upload script during checkout

    Also explained on page 181 of the eStart Your Web Store With Zen Cart user's manual, is the fact that you can set allowed file types in Admin->Configuration->Maximum Values->Allowed Filename Extensions for uploading
    .

    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.

  7. #7
    Join Date
    Apr 2007
    Posts
    86
    Plugin Contributions
    0

    Default Re: Upload script during checkout

    Thank you thank you thank you!

    I got it all figured out, works great...

    but the files that are uploaded to images/uploads are appearing as:
    "images/uploads/1.jpg"
    "images/uploads/2.jpg"
    etc...

    I need the file names to be the same as the ones the customer uploads so that I can match it to their order. This is very important.

  8. #8
    Join Date
    May 2006
    Posts
    14
    Plugin Contributions
    0

    Default Re: Upload script during checkout

    Quote Originally Posted by onelove5683
    Also, it would be great if the files could be associated with their account.
    DrByte,

    I am so glad to have found this post.

    So, is the uploaded image associated with an order? That would be great.

    Is the uploaded-by-the-customer image stored in the database and is it retrievable from the order management page in admin?

    Thank you,
    P

  9. #9
    Join Date
    Apr 2007
    Posts
    86
    Plugin Contributions
    0

    Default Re: Upload script during checkout

    Quote Originally Posted by papadopoulos View Post
    So, is the uploaded image associated with an order? That would be great.

    Is the uploaded-by-the-customer image stored in the database and is it retrievable from the order management page in admin?

    Thank you,
    P
    Hi, I can answer that question for you.

    The customer can have the ability to upload any type of file extension that you allow in admin/config/max values/"Allowed Filename Extensions for uploading"

    When the image is uploaded to the server by the customer, it is stored in images/uploads and is ordered by numbers. For example: "1.jpg" "2.gif"

    If you go to admin/customers/orders you can see the name of the file that the customer uploaded, but there doesn't seem to be any way to retrieve the file from admin, you would have to use FTP.



    I was hoping that it would become numbered as well as keep the customers original filename when they are uploaded to the images/uploads directory. Fortunately enough, the number that is applied to the filename in the images/uploads folder matches the number applied to the filename in the Orders section of admin.

  10. #10
    Join Date
    May 2006
    Posts
    14
    Plugin Contributions
    0

    Default Re: Upload script during checkout

    onelove,

    Thank you very much,
    P

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v139h File upload during checkout?
    By jenpen in forum Basic Configuration
    Replies: 2
    Last Post: 18 May 2012, 07:08 AM
  2. Replies: 8
    Last Post: 22 May 2010, 04:47 PM
  3. Ignore Java Script during secure session
    By davefant in forum Basic Configuration
    Replies: 2
    Last Post: 11 Jan 2008, 06:38 AM
  4. Upload During Checkout
    By sleastack in forum General Questions
    Replies: 4
    Last Post: 18 Oct 2007, 12:33 PM
  5. Image Upload during Checkout
    By pidotcr in forum All Other Contributions/Addons
    Replies: 2
    Last Post: 2 Sep 2007, 05:17 PM

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