0

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>
1
  • Did you gave description for the each product in wish list? Jul 31, 2015 at 19:27

1 Answer 1

7

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/

3
  • Mark your self answered answer as the accepted answer please \o/ Sep 1, 2015 at 9:14
  • Weird that you don't have formkey on getBlockHtml(), because is the same that de code with you replaced it. Nov 9, 2017 at 9:19
  • However my upvote :) Nov 9, 2017 at 9:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.