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>
  • Did you gave description for the each product in wish list? – MeenakshiSundaram R Jul 31 '15 at 19:27
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/

  • Mark your self answered answer as the accepted answer please \o/ – Barry Carlyon Sep 1 '15 at 9:14
  • Weird that you don't have formkey on getBlockHtml(), because is the same that de code with you replaced it. – Marcos Pérez Gude Nov 9 '17 at 9:19
  • However my upvote :) – Marcos Pérez Gude Nov 9 '17 at 9:19

Your Answer

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

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