Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1
    Join Date
    Jul 2008
    Location
    Tucson, Arizona
    Posts
    22
    Plugin Contributions
    0

    Default File Upload Code

    Anyone know how I might go about doing this or if it is even possible: My customers MUST upload a file (or mail it to me) in order for a sale to take place.

    1. How do I make it so that the customer either checks a box indicating that they will mail the image or that they actually upload an image?

    2. Is there anyway to have the file actually upload after the customer commits to the cart (step three in the check out process). The way it stands now, a customer can abandon their cart but since the file upload procedure is performed when a customer adds an item to the cart a file gets upload unnecessary, and without any indication to the administrator. This can get pretty messy and confusing to an active storefront.


    Thanks

    Ken

  2. #2
    Join Date
    Mar 2008
    Location
    Cape Town & London (depends on the season)
    Posts
    2,975
    Plugin Contributions
    0

    Default Re: File Upload Code

    There is a file upload feature in the attributes facility. So you create a product record, then apply this attribute to that product.

    It's typically used, for example, by people selling customised t-shirts, where the customer is required to provide a personal logo or image they want on the specified item of clothing.

    When they reach the product info page, there will be a "file upload" facility (browse their local drive, attach the pic/file, add to shopping cart.)

    Zencart then processes the order and the relevant uploaded file is put into your "uploads" folder. You access this file either through FTP program, or your c-panel admin facility. The relevant upload file can be identified according to the customer's order number.

  3. #3
    Join Date
    Jul 2008
    Location
    Tucson, Arizona
    Posts
    22
    Plugin Contributions
    0

    cart error Re: File Upload Code

    Quote Originally Posted by fairestcape View Post
    There is a file upload feature in the attributes facility. So you create a product record, then apply this attribute to that product.
    Hi and thanks for the response. Yes, I am aware of the File Upload Attribute and currently have it enabled for my test cart. But, as I said in my 1st post, I need a way to ensure that my customers send the file.

    As it stands right now, customers can ignore the file upload feature and pay for their order without submitting a file (which is needed to complete the order).

    What i tried to convey in my 1st post is that I need a way to ensure that the customer either submits the image file through the file upload feature or they indicate that they will submit the file some other way (snail mail or email).

    I also wanted to know if there is anyway to have the file upload to the server AFTER the customer has committed to the shopping cart rather than as they are putting items in their carts. As it stands now a customer can add a number of items to their cart and, since each item request a file, a file gets loaded to the server. Well if the cart gets abandoned then the administrator is left with a number of files that he/she has no clue about and no indication that the files were uploaded.

    Anyhow, it seems that by the lack of response to this thread, I am up against another brick wall within Zen Cart. I kind of wonder if i am ever going to get this thing deployed


    Ken

  4. #4
    Join Date
    Mar 2008
    Location
    Cape Town & London (depends on the season)
    Posts
    2,975
    Plugin Contributions
    0

    Default Re: File Upload Code

    I think there's a way to set the attribute to "required", so that a product will not be added to the cart unless that attribute is selected.

    I don't know the processing behind file upload, but if the cart gets abandoned, do the files actually get uploaded to the server?

    Sorry, but I don't have enough experience in file uploads to help you further.

    It may be that in some cases, you are going to have to make contact with your customer to discuss the submission of appropriate files.

  5. #5
    Join Date
    Jul 2008
    Location
    Paris, France
    Posts
    5
    Plugin Contributions
    0

    Default Re: File Upload Code

    kminnich, I'm working with the same problem. But I don't want the dual option of sending the file by email, so I won't address that here.

    I still haven't resolved this issue, but I can suggest two things. First, that you look at your MySQL database and the table zc_files_uploaded. You'll note that if files are uploaded by an unidentified customer, the customer_id field is Null. I think in those cases you can safely assume the files are worthless to you.

    Second, look at the table zc_product_attributes, specifically the products_id and attributes_required fields. From the instructions for use of the attributes_required field it appears it is only tested in the php templates for text fields. But the database table apparently holds the attributes_required field for all attributes. From there, it's just a matter of writing a little SQL and PHP to throw an error into the message stack if no file has indeed been uploaded.

    I haven't done that yet -- it's Sunday and I'm going out for a bike ride. But I'll get back to you if these leads don't pan out and another track seems indicated.

    Note: In ZC 1.3.8a, if an unauthorized file type is uploaded, the product is added to the shopping cart anyway and the File Type error is displayed there. This needs another fix; I've asked if anyone's already developed a workaround on this thread:

    http://www.zen-cart.com/forum/showthread.php?t=48930

  6. #6
    Join Date
    Jul 2008
    Location
    Tucson, Arizona
    Posts
    22
    Plugin Contributions
    0

    Idea or Suggestion Re: File Upload Code

    Hi Franck,

    Thanks for the response to my thread. Yes, I am aware of the MySQL tables and fields pertaining to this issue and I am desperately attempting to produce a work around that is specific to my needs.

    The code, out of the box, does not appear to be very efficient in that it consumes resources when they are not needed. It also allows an order to finalize even though the requirements for that order have not been satisfied.

    I am not a programmer by trade but do understand and can follow the flow of most scripts but I must confess that the layers upon layers of code in ZC often leaves me dazed and confused. And the logic—well it doesn’t seem very logical to me.

    It is a shame that this program is not supported more by the folks that seem to know the answers to the problems. There is so many great things said about the program in their advertisements but once a person stumbles against a brick wall they are left to fiend for themselves or waiting for “the next upgrade” whenever that will be. A good example of lack of support is the thread that you included in your post: you have gotten absolutely no help with your issue and it has been almost a year.

    I don’t mind fending for my self, as a matter-of-fact I tend to enjoy the satisfaction of resolving a problem on my own, but in this case I truly don’t know where to start. I have gone so far as to solicit a programmer that I would happily pay for—no response!

    As far as my solution goes, I am thinking that in the case of file uploading goes, another step needs to be added to the checkout process that only gets called when a file upload is required. This step should be just prior to the actual payment option. The step would REQUIRE a file be uploaded (or in my case a decision to mail the image or upload the image) prior to payment! Of course appropriate error checking for proper file types, file receipt, etc should be included here. This seems logical to me and not a waste of resource in that the only time the procedure gets called is when there is an actual need to upload files. Also the customer can do their entire file browsing in a single step rather than per item which may or may not be a time saver. As I said earlier, I don’t even know where to begin such a task and if anyone has any suggestions I will be most grateful.

    ZC is a great product without a doubt but some of its limitations are practically FORCING me to look in other areas for a shopping cart solution. As a business owner, I truly can’t afford the time to do all of this research, code hacking, or even learning the ins and outs of such a complex program.

    Anyway, a lot of words here with no solution, it is comforting to know that at least one other person in this world see things the same as I do.

    Thanks again,

    Ken

  7. #7
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    10,511
    Plugin Contributions
    126

    Default Re: File Upload Code

    Quote Originally Posted by kminnich View Post
    I don’t mind fending for my self, as a matter-of-fact I tend to enjoy the satisfaction of resolving a problem on my own, but in this case I truly don’t know where to start. I have gone so far as to solicit a programmer that I would happily pay for—no response!
    I noticed you haven't posted to the Commercial Help Wanted area on this site. Perhaps if you did that, you'd get a response.

    Good luck,
    That Software Guy
    That Software Guy. My Store: Zen Cart Support
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

  8. #8
    Join Date
    Jul 2008
    Location
    Tucson, Arizona
    Posts
    22
    Plugin Contributions
    0

    Default Re: File Upload Code

    Quote Originally Posted by swguy View Post
    I noticed you haven't posted to the Commercial Help Wanted area on this site. Perhaps if you did that, you'd get a response.

    Good luck,
    That Software Guy
    Ah, but I did post a request about two weeks ago. Seems no one is interested.

    Ken

  9. #9
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    10,511
    Plugin Contributions
    126

    Default Re: File Upload Code

    I completely missed that. Sorry.

    OK, my suggestion would be to break the job down. A simpler proposal with a smaller number of requirements - foregoing the link between the two shopping carts as a start - might yield more interest.
    That Software Guy. My Store: Zen Cart Support
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

  10. #10
    Join Date
    Jul 2008
    Location
    Tucson, Arizona
    Posts
    22
    Plugin Contributions
    0

    Default Re: File Upload Code

    Thanks SWGUY

    I added a message to the thread isolating my imediate needs. Is this something you might be intrested in?

    Ken

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Thumbnail Preview of file after upload via Attribute File uploader?
    By NWFAP in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 7 Aug 2015, 03:40 AM
  2. v139h uploading artwork file (attribute) does not upload file
    By delia in forum General Questions
    Replies: 11
    Last Post: 1 Sep 2013, 08:41 PM
  3. Replies: 8
    Last Post: 22 May 2010, 04:47 PM
  4. 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
  5. Upload Image or Upload File form
    By matthelm in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 30 Dec 2006, 01:13 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