I have installed Magento 1.8.0 and on localhost the cart is working correctly. I change the quantity of a product in the cart then I push the "Update cart" button and all works fine. I trasferred the site online and the cart quantity doesn't work anymore. As I change the quantity of a product and click the button the quantity remains the same. If I go back and try to add the same product to the cart, even if I specify a different quantity like 10 and not 1, in the cart only 1 item is added every time I click on "add to the cart" button and not 10 as specified. I cannot figure out where's the problem. I excluded my custom theme and rolled back to the default theme and the problem persist. I updated magento to 1.8.1 and the same problem.
In your theme directory
In your /app/design/frontend/yourthemepackage/default/template/checkout/cart.phtml file or /app/design/frontend/default/yourtheme/template/checkout/cart.phtml file
Just place on line 50 just after getUrl('checkout/cart/updatePost') ?>" method="post"> paste the below code
<?php echo $this->getBlockHtml('formkey'); ?>
it will work fine now.
P.S. for more information you can check same answer on http://magento-online-tutorials.blogspot.in/2015/11/shopping-cart-quantity-not-able-to.html
Those who have upgraded their Magento to 1.8 must have following line in
app\design\frontend\default\customtheme\template\checkout\cart.phtml
<form action="<?php echo $this->getUrl('checkout/cart/updatePost') ?>" method="post">
<?php echo $this->getBlockHtml('formkey'); ?> // this line must be there
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With