Results 1 to 6 of 6
  1. #1
    Join Date
    Apr 2008
    Location
    London
    Posts
    596
    Plugin Contributions
    0

    Default number_of_uploads - Remove?

    I've not seen this before so I must have turned it off somewhere but I can't find where.
    When adding something to the cart get this in the URL:

    number_of_uploads=0

    There are no uploads allowed anywhere so I am puzzled as to where it could have come from.

    How do I get rid of this?

    1.3.8a + SEO URL's + PHP5
    Last edited by bigbadboy; 18 May 2008 at 01:16 AM.

  2. #2
    Join Date
    Mar 2008
    Posts
    13
    Plugin Contributions
    0

    Default Re: number_of_uploads - Remove?

    I have edited the includes/modules/attributes.php file to remove the number_of_uploads parameter. hopefully from everywhere but I need a Zen-cart Guru to check I havent done anything that will cause other problems.

    Around Line 54 commented out as follows:
    Code:
    // $number_of_uploads = 0;
    Around line 458 commented out as follows:
    Code:
    // $number_of_uploads++;
    Around line 462 & 463
    Commented out
    Code:
    // zen_draw_hidden_field(UPLOAD_PREFIX . $number_of_uploads, $products_options_names->fields['products_options_id']) . "\n" .
    // zen_draw_hidden_field(TEXT_PREFIX . UPLOAD_PREFIX . $number_of_uploads, $_SESSION['cart']->contents[$prod_id]['attributes_values'][$products_options_names->fields['products_options_id']]);
    Replaced line 462 & 463 with following:
    Code:
    zen_draw_hidden_field( $products_options_names->fields['products_options_id']) . "\n" .
    zen_draw_hidden_field( $_SESSION['cart']->contents[$prod_id]['attributes_values'][$products_options_names->fields['products_options_id']]);
    Around line 612 613 614 commented out
    Code:
    // $_GET['number_of_uploads'] = $number_of_uploads;
    // zen_draw_hidden_field('number_of_uploads', $_GET['number_of_uploads']);
    // zen_draw_hidden_field('number_of_uploads', $number_of_uploads);
    Any feedback would be appreciated.

  3. #3
    Join Date
    Sep 2010
    Posts
    38
    Plugin Contributions
    0

    Default Re: number_of_uploads - Remove?

    How did this work out? The number_of_uploads is annoying me too!

  4. #4
    Join Date
    Jun 2012
    Posts
    1
    Plugin Contributions
    0

    Default Re: number_of_uploads - Remove?

    Hi.... Any updates for this thread? I have the same problem

  5. #5
    Join Date
    Aug 2010
    Posts
    76
    Plugin Contributions
    0

    Default Re: number_of_uploads - Remove?

    Count me in. Same problem here.

  6. #6
    Join Date
    Nov 2008
    Posts
    164
    Plugin Contributions
    0

    Default Re: number_of_uploads - Remove?

    Ran into this today and saw no one had posted a fix. Don't go editing the functions files.

    FILE: includes/templates/YOUR_TEMPLATE/templates/tpl_product_info_display.php
    Locate:
    Code:
    echo zen_draw_form('cart_quantity', zen_href_link(zen_get_info_page($_GET['products_id']), zen_get_all_get_params(array('action')) . 'action=add_product'), 'post', 'enctype="multipart/form-data"') . "\n";
    Change to (changes in red):
    Code:
    echo zen_draw_form('cart_quantity', zen_href_link(zen_get_info_page($_GET['products_id']), zen_get_all_get_params(array('action','number_of_uploads')) . 'action=add_product'), 'post', 'enctype="multipart/form-data"') . "\n";
    The change is to add the "number_of_uploads" parameter to the array of parameters excluded when building a URL with the zen_get_all_get_params function. This makes use of the built-in Zen-Cart function that omits parameters when building a URL (in this case, the URL the visitor ends up at after submitting the "add to cart" form), which should keep anything from breaking.

    Note that this will disable all file uploads - so only make the change if you don't ever plan on using the uploads feature on any products you sell.

    It may also make the 'enctype='"multipart/form-data"' unnecessary, but doesn't seem to affect my site so I've left it in.

 

 

Similar Threads

  1. v154 Removing **&number_of_uploads=0**
    By kcb410 in forum Setting Up Categories, Products, Attributes
    Replies: 5
    Last Post: 29 Apr 2016, 06:39 PM
  2. how can I remove &number_of_uploads=0?
    By member in forum General Questions
    Replies: 3
    Last Post: 6 Dec 2010, 08:47 PM
  3. Replies: 0
    Last Post: 2 Oct 2008, 01:26 AM

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