Magento – Update Shopping Cart button in checkout/cart does not update the quantity when clicked

cartce-1.9.2.0checkoutshopping-cart

Using Magento 1.9.2 – Update Shopping Cart button on checkout/cart page will not update the quantity when clicked.

Numerous posts regarding this issue suggest adding the following code

<?php echo $this->getBlockHtml(‘formkey’); ?> 

after

<form action="<?php echo $this->getUrl('checkout/cart/updatePost') ?>" method="post"> 

in the cart.phtml file.

I did this however it did not fix the issue.

Here is the code for the button:

<button type="submit" title="<?php echo $this->__('Update Shopping Cart') ?>" class="button btn-update"><span><span><?php echo $this->__('Update Shopping Cart') ?></span></span></button>

Best Answer

Found the solution.

I replaced

<?php echo $this->getBlockHtml(‘formkey’); ?> 

with

<input type="hidden" name="form_key" value="<?php echo Mage::getSingleton('core/session')->getFormKey(); ?>"/>

inside the fieldset of the form.

Got info from this article http://www.bricksandmortarweb.com/blog/update-cart-working-magento-1-9/