0

When I change the quantity of a cart item from the product "configure" page (.../checkout/cart/configure/id/...), the order item quantity is increased with the quantity, instead of updated.

i.e. if I hit the Edit link of a product from my cart, set the quantity to 2 and hit the "Update Cart" button, I end up with a quantity of 3 for this product, instead of 2.

Any helper please ?

2
  • This is actually default behaviour for Magento since the quantity can be changed inside the cart directly. I am not sure if there is an easy way to konfigure the setting to work differently. – user3154108 Sep 30 '14 at 12:45
  • I do have a bug in my installation, because if I change an option of a configurable product and hit "Update Cart", I end up with a new order item in the cart view. It should clearly update the initial order item's option instead. – user3190 Sep 30 '14 at 20:47
1

The problem was coming from my catalog/product/view.phtml template override line 42.

The form's action method was set to always add to cart. I fixed it by replacing the line

<form action="<?php echo $this->getAddToCartUrl($_product) ?>" method="post" id="product_addtocart_form"<?php if ($_product->getOptions()): ?> enctype="multipart/form-data"<?php endif; ?>>

with

<form action="<?php echo $this->getSubmitUrl($_product) ?>" method="post" id="product_addtocart_form"<?php if ($_product->getOptions()): ?> enctype="multipart/form-data"<?php endif; ?>>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy