Page 1 of 2 12 LastLast
Results 1 to 10 of 12
  1. #1
    Join Date
    May 2006
    Location
    Gardiner, Maine
    Posts
    2,371
    Plugin Contributions
    23

    Default uploading artwork file (attribute) does not upload file

    Out of all my years working in zen cart I've never been required to set up a file upload. I know this works and I thought I knew what to do but the truth is that it's not working.

    Attribute is set up as a file. After you browse for the image and select one (I am using a very small one), the name of the image appears. When you add to cart, there is no evidence that the file uploaded and sure enough, it hasn't uploaded.

    What file controls the uploading of the attribute images? I know that I have the correct version of the modules/attribute.php file in the cart.

    The images folder is set at 755 on this server and there's no problem uploading product images. I even checked the configure file to make sure all was fine there.

    No dice. It's just not uploading files and I don't know why or where this is in the zen cart file structure to check. Help point the way for me.
    The full-time Zen Cart Guru. WizTech4ZC.com
    New template for 2.0 viewable here: 2.0 Demo

  2. #2
    Join Date
    Feb 2005
    Location
    Lansing, Michigan USA
    Posts
    20,021
    Plugin Contributions
    3

    Default Re: uploading artwork file (attribute) does not upload file

    I just set up a product with a file upload on a test site. When I checked out, the file name was listed in the shopping cart, but the file is nowhere to be found on the server. Not sure if this is a bug or I did something wrong.
    Last edited by stevesh; 7 Aug 2013 at 03:46 PM.

  3. #3
    Join Date
    Feb 2005
    Location
    Lansing, Michigan USA
    Posts
    20,021
    Plugin Contributions
    3

    Default Re: uploading artwork file (attribute) does not upload file

    Oops. Never mind. I was expecting the file to be uploaded with its original file name. It is in the images/upload folder with the file name 1.jpg. I guess the next file uploaded will be 2.jpg, etc.

  4. #4
    Join Date
    Jan 2004
    Posts
    66,450
    Plugin Contributions
    81

    Default Re: uploading artwork file (attribute) does not upload file

    I just set up a fresh 1.5.1 site to test it. I used the "Bug's Life Multi-Pak" product from the demo products, and simply chose a basic 1K .jpg file from my local computer as the item I wanted to upload.
    The server I used for this requires 777 for uploading, so I tested it first with 755, and it gave me a nice MessageStack error message on the Shopping Cart page (since it redirects to the shopping cart during add-to-cart), saying "Error: Destination not writable".
    When I changed it to 777 and tried again it gave me a new alert saying File uploaded successfully, and I can see the filename in the attribute details of the product added to the cart.

    My server's PHP is configured to allow file-uploads, upload-max-size is set to 2M, and post-max-size is set to 8M, and the upload-tmp-folder is the default /tmp folder which has normal system permissions. These are all the same kind of settings that allow the admin side to upload product images as well.

    In fact the same upload code is used for both catalog and admin.
    .
    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
    May 2006
    Location
    Gardiner, Maine
    Posts
    2,371
    Plugin Contributions
    23

    Default Re: uploading artwork file (attribute) does not upload file

    an alert saying it was successful? Not seeing any messaging at all. We are about to install a new template though - no messaging might be caused by the old, crappy template. Just missing that alert message tells me something is wrong. So will revisit this if necessary once the new template.

    Thanks Dr. Byte!
    The full-time Zen Cart Guru. WizTech4ZC.com
    New template for 2.0 viewable here: 2.0 Demo

  6. #6
    Join Date
    Jan 2004
    Posts
    66,450
    Plugin Contributions
    81

    Default Re: uploading artwork file (attribute) does not upload file

    I did my testing using Classic, based on the original v1.5.1 install.
    .
    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
    May 2006
    Location
    Gardiner, Maine
    Posts
    2,371
    Plugin Contributions
    23

    Default Re: uploading artwork file (attribute) does not upload file

    So I accidentally found the result of the problem in the page source:

    <h4 class="optionName back"><label class="attribsUploads" for="attrib-44-0">Art File Upload</label></h4>
    <div class="back">
    <input type="file" name="id[TEXT_PREFIX44]" id="attrib-44-0" /><br />
    <input type="hidden" name="UPLOAD_PREFIX1" value="44" />
    <input type="hidden" name="TEXT_PREFIXUPLOAD_PREFIX1" />

    The other attributes aren't having this problem, only the upload one is. I made sure the files that mention either the TEXT_PREFIX or the UPLOAD_PREFIX are fresh files with no overrides. But it's not creating the proper substitutions.

    Any guesses?
    The full-time Zen Cart Guru. WizTech4ZC.com
    New template for 2.0 viewable here: 2.0 Demo

  8. #8
    Join Date
    May 2006
    Location
    Gardiner, Maine
    Posts
    2,371
    Plugin Contributions
    23

    Default Re: uploading artwork file (attribute) does not upload file

    Those missing parameters are in the configuration settings and missing in the database. So of course then I don't know what else is missing but at least the source code now shows the correct stuff.

    Still doesn't work.

    The site was a fresh install of 1.3.7, upgraded to 1.3.8 and then to 1.3.9h.

    The missing config settings were added / modified back long before 1.3.7 so looks like they may have gotten eliminated somehow.

    But I'm left with the question of what else might be missing. I checked the config settings in the sql around these parameters and everything seems to be there. So the question is do I still have a database problem or not.

    Is there any facility that allow checking existing configuration settings against what is supposed to be there? Another upgrade would not seem to the answer. Starting with a new cart and recreating the site looks to be the only way to solve this but I sure want to have explored all the options before then. Client does not want to go that extra money to upgrade or recreate the site right now.
    The full-time Zen Cart Guru. WizTech4ZC.com
    New template for 2.0 viewable here: 2.0 Demo

  9. #9
    Join Date
    Jan 2004
    Posts
    66,450
    Plugin Contributions
    81

    Default Re: uploading artwork file (attribute) does not upload file

    I'd probably compare all the configuration_key entries from the configuration table in that database with those from a good database, and see what's missing. Then work on a plan to put back the ones that shouldn't have been deleted in the first place.
    .
    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.

  10. #10
    Join Date
    May 2006
    Location
    Gardiner, Maine
    Posts
    2,371
    Plugin Contributions
    23

    Default Re: uploading artwork file (attribute) does not upload file

    Done and found one extra setting missing - nothing to do with this. That was easier than I had thought actually.

    I have checked / uploaded again fresh all files that I can find that have anything to do with uploading images:
    classes/upload.php
    functions/compatibility.php
    modules/attributes.php
    templates - tpl_main_page.php
    tpl_modules_attributes.php

    No problem adding images in admin.
    Image folders named correctly and working fine.

    checked config files for proper designation of upload directory

    Unless you can think of anything I might have missed, I'm going to have to recommend she start over again.
    The full-time Zen Cart Guru. WizTech4ZC.com
    New template for 2.0 viewable here: 2.0 Demo

 

 
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. File Upload Attribute - File Size Limit?
    By Genevieve in forum General Questions
    Replies: 2
    Last Post: 4 May 2010, 06:33 PM
  3. Attribute Upload File
    By leilanddale in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 26 Feb 2010, 06:39 PM
  4. File upload not uploading
    By Uniformality in forum Setting Up Categories, Products, Attributes
    Replies: 3
    Last Post: 26 Jan 2008, 05:55 PM
  5. Upload File does not work!! PLEASE HELP!!
    By Promogator in forum General Questions
    Replies: 1
    Last Post: 22 Jan 2008, 04:26 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