Thursday, April 16, 2015

Internet Explorer Adds Twice the Quantity to Cart

IE 8 (Internet Explorer 8) will add the product twice and cause the quantity of that product in the cart to double up (two quantities).

Change:
<button onclick="productAddToCartForm.submit(this)"><?php echo $this->__('Add to Cart') ?></button>

To
<button onclick="productAddToCartForm.submit(this); return false;"><?php echo $this->__('Add to Cart') ?></button>

Reference:

http://stackoverflow.com/questions/9021040/magento-theme-adds-product-2x-to-cart-in-ie-javascript
http://optimiseblog.co.uk/magento-fix-internet-explorer-adds-twice-doubl-quantity-to-cart/

No comments: