Results 1 to 8 of 8
  1. #1
    Join Date
    Aug 2011
    Posts
    4
    Plugin Contributions
    0

    Default Attach a filename from the checkout page and carry it through to the back end

    Hi,
    Fairly new to Zencart and loving it so far. I'm working on an apparel site which offers custom design along with their shirts. I'm running version 1.3.9 and the link is prothings.com/store

    After purchasing a shirt and selecting the custom design option, an artwork uploader is generated on the Checkout page. I've used javascript to pull the file names of the uploaded files and place them into the correct orders at the end of the unordered list of price attributes.

    Everything works correctly (still a few minor bugs), but when proceeding on to the other checkout steps the artwork file names drop off. Is there any way to keep these names intact and carry them through the rest of the checkout process and eventually onto the order in the admin?

    Thanks!

  2. #2
    Join Date
    Jun 2003
    Posts
    33,720
    Plugin Contributions
    0

    Default Re: Attach a filename from the checkout page and carry it through to the back end

    Why aren't you using the built in upload attribute?
    Please do not PM for support issues: a private solution doesn't benefit the community.

    Be careful with unsolicited advice via email or PM - Make sure the person you are talking to is a reliable source.

  3. #3
    Join Date
    Aug 2011
    Posts
    4
    Plugin Contributions
    0

    Default Re: Attach a filename from the checkout page and carry it through to the back end

    Hi, I'm not using the file upload attribute for a couple of reasons:

    1. I require multiple files to be uploaded for each product (an unknown number of files)

    2. If artwork/design is chosen, then this becomes a required field (from the forums I've discovered you can't really make this a required field)

    For those 2 reasons I've had to integrate the uploader outside of the ZenCart attributes. At this point they are now required for orders that need artwork and provide a way to name files according to the order name as well as make these required before proceeding to the checkout (by simply showing the cart checkout button once artwork is assigned to an order). I've purchased the ZC manual and read it as well as searching both the forums and google and believe this to be the best method for what I need on this site. The ZC file upload field just wasn't cutting it...

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

    Default Re: Attach a filename from the checkout page and carry it through to the back end

    If you set your custom upload code to insert the selected filename and other information that you want added as attributes, then the data will pass thru to the order as attribute data. If you don't, then ... it won't.
    .

    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
    Aug 2011
    Posts
    4
    Plugin Contributions
    0

    Default Re: Attach a filename from the checkout page and carry it through to the back end

    Sorry, I'm not following you when you say:

    "If you set your custom upload code to insert the selected filename and other information that you want added as attributes, then the data will pass thru"

    How would I go about doing this?

    I cannot use a price attribute for the uploader due to the reasons I listed earlier, so I'm stuck trying to dynamically add the information to the form from the cart checkout page using jquery....
    Thanks!

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

    Default Re: Attach a filename from the checkout page and carry it through to the back end

    Well, since you're not using the normal method of linking filenames at the time of add-to-cart, you're going to have to get creative with a way to update the cart contents long after it's already been set, ie: once your uploader tool does its magic. You'll need to study the shopping cart class and see how it stores the information, and work up your own way to inject the additional required entries.

    And you'll probably need to create (otherwise unused) attributes for it to link to, else the database relationships won't match and thus the records will be excluded from the joins and thus won't show.
    .

    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
    Aug 2011
    Posts
    4
    Plugin Contributions
    0

    Default Re: Attach a filename from the checkout page and carry it through to the back end

    Ahhhh, this would be much easier if zc supported multiple file uploads with required fields....

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

    Default Re: Attach a filename from the checkout page and carry it through to the back end

    You could always simply code it to make them required fields, if that's the real goal you have in mind.
    And share the code back to the community so others can benefit from it after you.
    .

    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.

 

 

Similar Threads

  1. v139h Speed up the Back end Orders speed and DB Size questions
    By explorer1979 in forum General Questions
    Replies: 0
    Last Post: 28 Aug 2012, 02:40 AM
  2. Using an Attribute to Carry Computed Price through Checkout
    By jaxbakers in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 28 Feb 2011, 02:57 PM
  3. my browser cant find the page at end of checkout
    By YZ250 in forum Upgrading from 1.3.x to 1.3.9
    Replies: 5
    Last Post: 4 Nov 2010, 07:02 AM
  4. Help, Blank Page on both Frend-End and Back-End
    By explorer1979 in forum Installing on a Linux/Unix Server
    Replies: 2
    Last Post: 14 Jun 2010, 07:57 AM
  5. Can I carry over the sideboxes to the home page?
    By sassayone in forum Basic Configuration
    Replies: 2
    Last Post: 3 Jun 2007, 02:46 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