Page 1 of 3 123 LastLast
Results 1 to 10 of 21
  1. #1
    Join Date
    Aug 2010
    Posts
    6
    Plugin Contributions
    0

    Default Problems when updating product quantities

    I am having a problem in my shopping cart. I have products that have quantity limits set. I can add a product to the cart with out issue. I start to have problems when I try to change the quantities in the shopping cart. I have a max quantity set to 10 items. If I only have a quantity of 1 in the cart and want to change it to 2, I have no problem. However, if I have 1 and want to change to 10, I get the message that I have exceeded my limit. It acts like it is adding the previous value and the changed value to determine if I am exceeding my quantity limit. You can view my site at: www.crappietomtackle.com/shop

  2. #2
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Problems when updating product quantities

    If you edit the file:
    /includes/classes/shopping_cart.php

    and change the code around line 1557 to read:
    Code:
              // adjust quantity if needed
              if ($new_qty > $add_max) {
                if (($new_qty + $cart_qty > $add_max) and $add_max != 0) {
                  $adjust_max= 'true';
                  $new_qty = $add_max - $cart_qty;
                }
              }
    
    does this fix the problem?
    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!

  3. #3
    Join Date
    Aug 2010
    Posts
    6
    Plugin Contributions
    0

    Default Re: Problems when updating product quantities

    That did indeed fix the problem. Thanks for the quick assistance.

  4. #4
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Problems when updating product quantities

    Thank you for confirming that this was able to fix the Maximum Value issue that you were having with the update quantity ...
    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!

  5. #5
    Join Date
    Aug 2005
    Location
    San Juan, Puerto Rico
    Posts
    1,525
    Plugin Contributions
    9

    Default Re: Problems when updating product quantities

    What version is this one?
    IDEAS Girl
    IDEAS Creative Group
    = Your image... our business!
    My contributions: SophyBlue / Sophy Blue-Grey / Mistik / The Bookshelf / Dynamic Sideboxes

  6. #6
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Problems when updating product quantities

    I believe this is a problem in v1.3.9e and v1.3.9f ...
    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!

  7. #7
    Join Date
    Nov 2006
    Posts
    512
    Plugin Contributions
    0

    Default The quantity added to your cart has been adjusted because of a restriction on max

    seeing this error in 1.3.9e:

    shopping cart page:

    The quantity added to your cart has been adjusted because of a restriction on maximum you are allowed. See this item:
    Error triggered by deleting items with checkbox(es) and update cart button on cart page

    error on all remaining products that are in cart, that are:

    Product Qty Minimum: 1
    Product Qty Maximum: 1
    Product Qty Units: 1
    Product Qty Min/Unit Mix: Yes
    Products Quantity: 1

    *not seeing this error on products that are in cart, that are: :

    Product Qty Maximum: *more than 1
    Products Quantity: *more than 1

    --------

    ALSO: Using the trash can icon to delete (not the checkbox/update cart) does not trigger this error.
    Zencart 1.3.9h - PHP 5.2.13 - My SQL 5.0.84 - Apache 1.3.41

  8. #8
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: The quantity added to your cart has been adjusted because of a restriction on max

    This is fixed in v1.3.9f ...

    Code:
    //die('I see Update Cart: ' . $_POST['products_id'][$i] . ' add qty: ' . $add_max . ' - cart qty: ' . $cart_qty . ' - newqty: ' . $new_qty);
            if (($add_max == 1 and $cart_qty == 1)) {
              // do not add
              $adjust_max= 'true';
            } else {
              // adjust quantity if needed
              if ($new_qty > $add_max) {
                if (($new_qty + $cart_qty > $add_max) and $add_max != 0) {
                  $adjust_max= 'true';
                  $new_qty = $add_max - $cart_qty;
                }
              }
              $attributes = ($_POST['id'][$_POST['products_id'][$i]]) ? $_POST['id'][$_POST['products_id'][$i]] : '';
              $this->add_cart($_POST['products_id'][$i], $new_qty, $attributes, false);
            }
            if ($adjust_max == 'true') {
    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!

  9. #9
    Join Date
    Nov 2006
    Posts
    512
    Plugin Contributions
    0

    Default Re: [DONE v1.3.9f] The quantity added to your cart has been adjusted because of a res

    Hi Linda!

    I tried that fix before posting in includes/classes/shopping_cart.php but it had no effect.
    Last edited by dharma; 20 Aug 2010 at 05:11 PM.
    Zencart 1.3.9h - PHP 5.2.13 - My SQL 5.0.84 - Apache 1.3.41

  10. #10
    Join Date
    Nov 2006
    Posts
    512
    Plugin Contributions
    0

    Default Re: [DONE v1.3.9f] The quantity added to your cart has been adjusted because of a res

    I just tried using the includes/classes/shopping_cart.php from 1.3.8f still no effect (the only change from 1.3.9e to f is the breadcrumb fix)

    I then dialed back to 1.3.9d's includes/classes/shopping_cart.php and do not see the errors.

    Must have something to do with these doohickies (added lines from d to e/f):

    Line 1535-1537:
    PHP Code:
          if ($_POST['cart_quantity'][$i] == '') {
            
    $_POST['cart_quantity'][$i] = 0;
          } 
    and Line 1546:

    PHP Code:
            $cart_qty $this->in_cart_mixed($_POST['products_id'][$i]); 
    Should I just take those bad boys out?
    Zencart 1.3.9h - PHP 5.2.13 - My SQL 5.0.84 - Apache 1.3.41

 

 
Page 1 of 3 123 LastLast

Similar Threads

  1. Replies: 2
    Last Post: 4 Mar 2011, 01:39 AM
  2. Editing Attribute selecitons once product has been added to cart
    By emilekott in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 1 Jun 2010, 07:44 PM
  3. Replies: 2
    Last Post: 1 Oct 2009, 10:18 PM
  4. Customising the Your Account Has Been Created! message
    By kelpie in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 13 Sep 2008, 04:43 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