Page 2 of 4 FirstFirst 1234 LastLast
Results 11 to 20 of 31
  1. #11
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,474
    Plugin Contributions
    6

    Default Re: Attribute File Upload

    The real filename is stored in the database ... to avoid overlaps ... it is saved to the server as a numeric filename ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  2. #12
    Join Date
    Oct 2005
    Posts
    2
    Plugin Contributions
    0

    Default Re: Attribute File Upload

    Thanks for the info Linda. I decided to use a copy of Innova's Asset Manager for viewing & managing the uploads form the admin area. Works like a charm and the client is happy!

  3. #13
    Join Date
    Aug 2006
    Posts
    2
    Plugin Contributions
    0

    Default Re: Attribute File Upload

    Where can I get Innova's Asset Manager for viewing & managing the uploads form the admin area. I really need this for my client as well.

    I also wanted to find out how or where I would set the upload attribute so the browse button is under the text field instead of being to the right of it. Help would be much appreciated.

  4. #14
    Join Date
    Feb 2006
    Posts
    21
    Plugin Contributions
    0

    Default Re: Attribute File Upload

    I dont understand why the file uploaded by the customer cannot be opened by the shop sales team in the Admin/orders area?

    In our case, when a trophy is ordered the shop staff log onto admin/customers/orders and can view the item, engraving & size requirements (attributes) and also need to see the uploaded image of the logo required - I shouldnt have to give them FTP access in order to do this.

    thanks to zincxxx for recommending Innova's Asset Manager, i'll have to go searching for it ASAP!

  5. #15
    Join Date
    Feb 2006
    Posts
    21
    Plugin Contributions
    0

    Re: Attribute File Upload

    DOH! just my luck I havent been able to find this asset manager thingy! Could anybody tell us where to find it or something similar??

    Or are there any code mods anyone here has done to allow customer uploaded files to be opened in admin panel?

    There must be lots of people who require this function...

    thanks for any help

  6. #16
    Join Date
    Nov 2005
    Posts
    6
    Plugin Contributions
    0

    Re: Attribute File Upload

    Okay, I found a modification on the OcCommerce forums to add a link to view the file/image from the edit order function in admin

    http://forums.oscommerce.com/lofiver...p/t202695.html

    I've gotten to the point where it doesn't throw any errors, but it still doesn't display a link either.

    I added this this a file under admin/includes/extra_configures
    define('DIR_WS_CATALOG_IMAGES_UPLOADS', DIR_WS_CATALOG_IMAGES .

    'uploads/');
    define('DIR_FS_CATALOG_IMAGES_UPLOADS', DIR_FS_CATALOG_IMAGES .

    'uploads/');

    I added this to a file under admin/includes/extra_datafiles/
    define('TABLE_PRODUCTS_OPTIONS_TYPES', 'products_options_types');

    Then in the orders.php, I tried to convert it to Zencart format from instructions I found online, but I must be missing something. This is what I have

    if (isset($order->products[$i]['attributes']) && (sizeof($order->products[$i]['attributes']) > 0)) {

    for ($j = 0, $k = sizeof($order->products[$i]['attributes']); $j < $k; $j++) {

    // Customization #31101 for file_upload view begin
    $option = $order->products[$i]['attributes'][$j]['option'];
    ## Build a query to check if this option is of 'File' Type
    $file_check_sql = " select count(*) from ".TABLE_PRODUCTS_OPTIONS ." o,

    ".TABLE_PRODUCTS_OPTIONS_TYPES." ot WHERE o.products_options_type = ot.products_options_types_id AND products_options_types_name='File' AND o.products_options_name='".$option."'";

    $file_check_sql = $db->Execute($file_check_sql);
    $isFile = $file_check_sql->RecordCount();

    if($isFile == 1 &&

    @file_exists(DIR_FS_CATALOG_IMAGES_UPLOADS.$order->products[$i]['attributes'][$j]['value'])){
    $link = "<a href=". DIR_WS_CATALOG_IMAGES_UPLOADS.$order->products[$i]['attributes'][$j]['value']." target='_blank'><i>Click to View</i></a>";
    }else {
    $link = "";

    }

    echo '<br /><nobr><small>&nbsp;<i> - ' . $order->products[$i]['attributes'][$j]['option'] . ': ' . nl2br($order->products[$i]['attributes'][$j]['value']);

    if ($order->products[$i]['attributes'][$j]['price'] != '0') echo ' (' . $order->products[$i]['attributes'][$j]['prefix'] . $currencies->format($order->products[$i]['attributes'][$j]['price'] * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']) . ')';

    if ($order->products[$i]['attributes'][$j]['product_attribute_is_free'] == '1' and $order->products[$i]['product_is_free'] == '1') echo TEXT_INFO_ATTRIBUTE_FREE;

    echo '&nbsp;'. $link.' </i></small></nobr>';
    // Customization #31101 end

    Should this be in another directory, like extra_functions rather than in the orders file? Can anyone tell why the link isn't displaying?

  7. #17
    Join Date
    Feb 2006
    Posts
    21
    Plugin Contributions
    0

    Re: Attribute File Upload

    Can any Zen superstars help on this??

    I'm certain it would be very helpful

  8. #18
    Join Date
    Feb 2005
    Posts
    283
    Plugin Contributions
    0

    Default Re: Attribute File Upload

    This is probably really bad practice (but desperate mesures were needed)- but my client required access to ftp'd up images files so I simply removed the htaccess file from the uploads folder - now they simply type the site address http://www.siteaddress.co.uk/images/...s/filename.jpg

    with the filename being specified on the customer order and they can then just get the image from the browser.

    I would not recommned doing this with any sort of senstive/private information.

  9. #19
    Join Date
    Sep 2006
    Location
    Gillette, NJ, USA
    Posts
    35
    Plugin Contributions
    0

    Default Re: Attribute File Upload

    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.
    Last edited by boylan; 6 Nov 2006 at 08:45 AM.

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

    Default Attribute File Upload [REQUIRED]

    I'm desperately searching for a solution to my problem: My products require customers to upload files (customized merchandise).

    But Zen Cart 1.3.8 allows customers to put items in the cart without the mandatory upload. No test for the upload seems to be run, even though the attribute is "Required".

    Can anyone help, please?

    Many thanks!

 

 
Page 2 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

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR