Results 1 to 6 of 6
  1. #1
    Join Date
    Sep 2009
    Posts
    65
    Plugin Contributions
    0

    Default Product Qty Maximum only allow half of quantity to added in shopping cart page

    Zen Cart Version: 1.3.9e

    Hi, I started using Zen Cart with 1.3.8a. I have always made extensive use of the "Product Qty Maximum" setting for my products. In 1.3.8a all aspects of Max Quantity worded corectly.

    Since upgrading to 1.3.9x I have found a problem (bug) with Max Quantity. Where a product has a Maximum Quantity setting, i.e., it is not set to the default of 0 (zero), I've noticed that it is not possible modify the quantities in the Shopping Cart page correctly
    /index.php?main_page=shopping_cart

    My Shopping cart page will only allow the quantity to be changed to half of what the actual Max Quantity is set to. For example, if I have the maximum quantity set to 3 for a product, customer adds a quantity of 1 or 2 to cart via the normal product listing, and then goes to the Shopping Cart page and tries to change the quantity to a higher value, it is reduced to 1 (halves the value of 3 and rounds it down to 1). If I have the Max Quantity set to 10, then it will only allow it to be changed to a Max value of 5 via the Shopping Cart page. Customers are able to achieve the correct Max Quantity via the normal product listing page, but in a lot cases my customers adjust their quantities via the Shopping Cart page. I am loosing quite a few orders because customers are not able to order the quantities that they normally are able to.

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

    Default Re: Product Qty Maximum only allow half of quantity to added in shopping cart page

    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!]
    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
    Sep 2010
    Posts
    263
    Plugin Contributions
    0

    red flag Re: Product Qty Maximum only allow half of quantity to added in shopping cart page

    I also have this problem in version 1.3.9h upgraded from 1.3.9g. Not sure if the problem existed in 1.3.9g

    In 1.3.9h I have a max qty of 2, but can only order 1. If I select 2 I get the error message.

    "The quantity added to your cart has been adjusted because of a restriction on maximum you are allowed. See this item:" Product XYZ etc....

    By the way this other thread is now closed.
    http://www.zen-cart.com/forum/showthread.php?t=162298

    So it seems this BUG remains.
    Thanks,
    007

  4. #4
    Join Date
    Sep 2010
    Posts
    263
    Plugin Contributions
    0

    Default Re: Product Qty Maximum only allow half of quantity to added in shopping cart page

    Actually it works fine if I type in the 2 or max qty at the first time I add to cart, but it gives the error if I start with 1 in the cart and then modify the cart to 2 or max qty.

    reference module;
    /includes/classes/shopping_cart.php

    i.e. I presume it's line 1560

    if (($new_qty + $cart_qty > $add_max) and $add_max != 0)

    This seems buggy
    Last edited by HeyIts007; 21 May 2011 at 03:33 PM.
    Thanks,
    007

  5. #5
    Join Date
    Sep 2010
    Posts
    263
    Plugin Contributions
    0

    red flag Re: Product Qty Maximum only allow half of quantity to added in shopping cart page

    I could be missing some additional complexity to this, but this also seems odd to me. on line 1562.

    $new_qty = $add_max - $cart_qty;

    Shouldn't ( $new_qty = $add_max ) and nothing more ?
    Thanks,
    007

  6. #6
    Join Date
    Sep 2010
    Posts
    263
    Plugin Contributions
    0

    Default Re: Product Qty Maximum only allow half of quantity to added in shopping cart page

    I found this simpler code to work better, but I could be missing something.


    if (($new_qty > $add_max ) and $add_max != 0) {
    $ adjust_max= 'true';
    $new_qty = $add_max;
    Thanks,
    007

 

 

Similar Threads

  1. Replies: 2
    Last Post: 22 May 2011, 05:13 PM
  2. Replies: 5
    Last Post: 28 Feb 2011, 12:30 PM
  3. Allow change of quantity in Shopping Cart
    By nea-esco in forum Managing Customers and Orders
    Replies: 4
    Last Post: 28 Jul 2010, 04:48 PM
  4. Show quantity in cart only when the product is already in shopping cart
    By e81ny in forum Templates, Stylesheets, Page Layout
    Replies: 15
    Last Post: 8 Sep 2007, 03:34 PM
  5. adjust quantity for max qty order in shopping cart
    By peeceelee in forum Bug Reports
    Replies: 3
    Last Post: 22 Aug 2006, 10:03 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