Page 3 of 4 FirstFirst 1234 LastLast
Results 21 to 30 of 31
  1. #21
    Join Date
    May 2008
    Location
    Pennsylvania
    Posts
    25
    Plugin Contributions
    0

    Default Re: Attribute File Upload

    Is the attribute for uploading a file only for images? I would like customers to be able to upload a text file or maybe a MS Word document. Is there a way to associate file types that are acceptable to upload (ie., .doc, pdf, .txt, etc.)?

    -Melissa

  2. #22
    Join Date
    May 2008
    Location
    Pennsylvania
    Posts
    25
    Plugin Contributions
    0

    Default Re: Attribute File Upload

    Ok, I finally found the answer to my question. I just couldn't remember where to find file types accepted to upload. It's under "Configuration", "Maximum Values" and then "Allowed Filename Extensions for uploading". I added the filename extensions I needed.

    -Melissa

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

    Default Re: Attribute File Upload

    Glad you found it. It's easy to set.

    But the upload function is buggy. I still haven't been able to make the upload required.

    And if a user tries to upload an unacceptable file type associated with a product, the error message displays in the cart... where the product has already been added.


    Franck
    Last edited by Franck; 24 Aug 2008 at 08:06 PM.

  4. #24
    Join Date
    May 2008
    Location
    Pennsylvania
    Posts
    25
    Plugin Contributions
    0

    Default Re: Attribute File Upload

    Thanks for replying. Do you know the file extension for a MS Word 2007 document? When I look under the file properties, it just says "MS Word Document". I've tried the .doc extension and the file is being rejected when I try to add it to my shopping cart for testing purposes.

    -Melissa

  5. #25
    Join Date
    May 2008
    Location
    Pennsylvania
    Posts
    25
    Plugin Contributions
    0

    Default Re: Attribute File Upload

    Yippie! Word 2007 uses the XML file format and uses the extension .docx. The file is no longer being rejected. I double checked and I can read the file too! It never hurts to check whether or not the file was saved without being corrupted.

    -Melissa

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

    Default Re: Attribute File Upload

    Quote Originally Posted by misscharlotte View Post
    Yippie! Word 2007 uses the XML file format and uses the extension .docx. The file is no longer being rejected.
    When you say the wrong file exension was rejected, can you tell me where the system was catching the error. If you choose a PDF file, for example, and then click Add To Cart, what happens? Does the error stop you on the product information page, or do you get directed to the Cart page with the item in the cart and NO FILE uploaded?

    This is the glitch I was referring to. If you're getting another behavior, I'd love to hear how it's working for you.

  7. #27
    Join Date
    Aug 2008
    Posts
    9
    Plugin Contributions
    0

    Default Re: Attribute File Upload

    Franck, did you ever figure out a way to make an upload required?

    I'm in the same boat as you...without a logo the order is basically incomplete, so I'd really like to make it required.

  8. #28
    Join Date
    Sep 2007
    Location
    Manchester, England
    Posts
    168
    Plugin Contributions
    0

    Default Re: Attribute File Upload

    Congratulations are due to the ZC developers for missing this one out. Whats the point of a file upload if no-one can view it!!


  9. #29
    Join Date
    Feb 2005
    Posts
    283
    Plugin Contributions
    0

    Default Re: Attribute File Upload

    You can view it - I use the image/file upload on a few sites.

    Basically you need to make the upload folder read/writeable (I also added an htaccess file to this folder)

    Then zen cleverly remanes the files and tells you the image name (if you look at the order placed with the file/image is attached to you'll see it there

    Then you simply go to http://www.mywebsite.co.uk/images/ze...g(/gif/doc/pdf) then right click and save.

    Of if you have ftp access simply download.

    Easy peasy!

  10. #30
    Join Date
    Jan 2009
    Posts
    126
    Plugin Contributions
    0

    Default Re: Attribute File Upload

    Hey,

    I have used the following method to make a link in my orders page to the image, however I have 11 different upload attributes (long story) and this creates a rather unsightly bit of code which isn't very flexible.

    The code now looks as follows:

    PHP Code:
    //echo '<br /><nobr><small>&nbsp;<i> - ' . $order->products[$i]['attributes'][$j]['option'] . ': ' . nl2br(zen_output_string_protected($order->products[$i]['attributes'][$j]['value']));
                      
    echo '<br><small>&nbsp;<i> - ' $order->products[$i]['attributes'][$j]['option'] . ': ';
            if ((
    $order->products[$i]['attributes'][$j]['option'] == "1") or ($order->products[$i]['attributes'][$j]['option'] == "2") or ($order->products[$i]['attributes'][$j]['option'] == "3") or ($order->products[$i]['attributes'][$j]['option'] == "4") or ($order->products[$i]['attributes'][$j]['option'] == "5") or ($order->products[$i]['attributes'][$j]['option'] == "6") or ($order->products[$i]['attributes'][$j]['option'] == "7") or ($order->products[$i]['attributes'][$j]['option'] == "8") or ($order->products[$i]['attributes'][$j]['option'] == "9") or ($order->products[$i]['attributes'][$j]['option'] == "10") or ($order->products[$i]['attributes'][$j]['option'] == "1.")){
            
    $full_logo_name  $order->products[$i]['attributes'][$j]['value'];
    $pieces explode("."$full_logo_name);
            echo 
    ' <a href="' HTTP_SERVER DIR_WS_CATALOG '/images/uploads/' $pieces[0] . '.' $pieces[2] . '" target="_blank">' nl2br($order->products[$i]['attributes'][$j]['value']) . '</a>';
            } else { 
    Obviously this would be 1,000,000's of times better if it had one "if" statement, which checked if the product_option_type was "file" and then did the same process. Does anyone know how to modify this?

    ORIGINAL METHOD:

    Quote Originally Posted by boylan View Post
    Continuing on the bad practice described above - I have changed the .htaccess file to allow access to the uploaded images from IP address of the store owner - and created a link on the edit order page to view the file. To do this on your site:
    (using 1.3.5)
    change line 401 of admin/orders.php FROM:
    Code:
              echo '<br /><nobr><small>&nbsp;<i> - ' . $order->products[$i]['attributes'][$j]['option'] . ': ' . nl2br($order->products[$i]['attributes'][$j]['value']);
    TO:
    Code:
    //          echo '<br><nobr><small>&nbsp;<i> - ' . $order->products[$i]['attributes'][$j]['option'] . ': ' . nl2br($order->products[$i]['attributes'][$j]['value']);
    		echo '<br><nobr><small>&nbsp;<i> - ' . $order->products[$i]['attributes'][$j]['option'] . ': ';
    		if ($order->products[$i]['attributes'][$j]['option'] == "Logo 1" || $order->products[$i]['attributes'][$j]['option'] == "Logo 2" || $order->products[$i]['attributes'][$j]['option'] == "Logo 3" || $order->products[$i]['attributes'][$j]['option'] == "Logo 4" || $order->products[$i]['attributes'][$j]['option'] == "Logo 5") {
    		$full_logo_name  = $order->products[$i]['attributes'][$j]['value'];
    $pieces = explode(".", $full_logo_name);
    		echo nl2br($order->products[$i]['attributes'][$j]['value']) . ' <a href="/images/uploads/' . $pieces[0] . '.' . $pieces[2] . '" target="_blank">View ' . $pieces[0] . '.' . $pieces[2] . '</a>';
    		} else {
    		echo nl2br($order->products[$i]['attributes'][$j]['value']);
    		}
    Which results in something like this:
    Logo 1: 4. joomla_logo_black.jpg View 4.jpg

    The above only works because the Option Name for uploaded images is "Logo 1" through "Logo 5". If the Option Name for your uploaded file is different, then change those names. It will also fail if there is more than one "." in a filename - but I'm not sure Zen-Cart would allow it to be uploaded.

    It currently works on my site, but no guarantees. Hope this helps some people - its not a full uploaded file editor, but it will allow unskilled store admins to at least see the uploaded files referenced without typing a bunch of stuff.

 

 
Page 3 of 4 FirstFirst 1234 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. File Upload Attribute - File Size Limit?
    By Genevieve in forum General Questions
    Replies: 2
    Last Post: 4 May 2010, 06:33 PM
  4. Attribute Upload File
    By leilanddale in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 26 Feb 2010, 06:39 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