If this is your first visit, check our documentation. To post, register or login.
Forums / Bug Reports / [Not a bug] Your Shopping Cart Contents page misleading. Add Qty / Edit Qty

[Not a bug] Your Shopping Cart Contents page misleading. Add Qty / Edit Qty

Locked

Started by heyits007 on 22 May 2011, 4:02 PM · Views: 2,308

Results 1 to 3 of 3
This thread is locked. New replies are disabled.
22 May 2011, 4:02 PM
#1
heyits007 avatar

heyits007

Zen Follower

Join Date:
Sep 2010
Posts:
270
Plugin Contributions:
0

[Not a bug] Your Shopping Cart Contents page misleading. Add Qty / Edit Qty

re; Your Shopping Cart Contents page misleading, regarding Add to cart Vs Edit cart quantity.

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

On the Your Shopping Cart Contents page;

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....

So it seems this BUG somewhat remains, but perhaps its more a BUG in the page design, as it appears like an Edit Cart Quantity page with a Refresh button, but if functions like the Add Product to Cart page. This creates a misleading impression of the cart functionality.

Thus if the max cart is 2 and you are on the edit page and you change it to 1, it tries to add the 1 to 2 ( thus exceeding max cart limit ) instead of editing the 2 to replace it with 1.

It really needs to function like an Edit Cart Quantity page and not an Add to Cart page, as the Add to cart page already exists before you get to this page.

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

Thanks,
007

22 May 2011, 4:09 PM
#2
heyits007 avatar

heyits007

Zen Follower

Join Date:
Sep 2010
Posts:
270
Plugin Contributions:
0

Re: [Not a bug] Your Shopping Cart Contents page misleading. Add Qty / Edit Qty

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 on the edit cart page being the "Your Shopping Cart Contents" page.

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)

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 it simply be ( $new_qty = $add_max ) and nothing more ?

This functionality seems buggy for the edit cart page.

Thanks,
007

22 May 2011, 4:13 PM
#3
heyits007 avatar

heyits007

Zen Follower

Join Date:
Sep 2010
Posts:
270
Plugin Contributions:
0

Re: [Not a bug] Your Shopping Cart Contents page misleading. Add Qty / Edit Qty

I found this simpler code to work better in terms of the intended page functionality of Add Vs Edit cart quantities, but I could be missing something.

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

Thanks,
007