A while ago I got into a company with a lot of problems in their Magento website, I have fixed a few major bugs in the website but I'm still stuck with this one bug.

This one is pretty common but for some reason ( as a Magento starter ) I can't seem to fix this bug.

I have seen a lot of posts containing the same fix but that fix does not seem to be available for me. Since they are all talking about editing cart.phtml in


So they are all telling me to put <?php echo $this->getBlockHtml('formkey'); ?>

on line 50 after

getUrl('checkout/cart/updatePost') ?>" method="post">

But my file seems to contain more or less than it should have. Here is my code : https://gist.github.com/anonymous/3759dc5742572d957825ab1c4a0172b3


I'm talking about Updating cart items in the checkout page Here is an example

So whenever I press on "Winkelwagen bijwerken" ( update shopping cart ) it simply does nothing ( well it does seem to refresh the form but that's it )

So I would like to know if there is a way to fix this?

  • Current version : Magento
  • Previous version : Magento 1.8

quick note : There were other trainees who worked on this update

  • Is your form key being rendered on the page (in the html)?
    – Joe
    Commented Oct 19, 2017 at 15:47
  • @Joe To be honest, I don't know. as you can see on line 103 the button sents something to the core ( I think? a request of some sort?? ) <button type="submit" name="update_cart_action" value="update_qty" title="<?php echo Mage::helper('core')->quoteEscape($this->__('Update Shopping Cart')); ?>" class="button btn-update"><span><span><?php echo $this->__('Update Shopping Cart'); ?></span></span></button> Commented Oct 20, 2017 at 7:09
  • @Joe I am currently running on my default theme which I think is located in design\frontend\default\default\template however I hardly have any folders in this folder, my checkout folder and other folders are located in app\design\frontend\base\default\template all of the guides are telling me to go to my own theme and edit cart.phtml and add a line after line 50 but I think my code is totally different or I am missing files. Commented Oct 20, 2017 at 8:10
  • View your source and search for "form_key". If it's there, you'll see an input element like <input name="form_key" type="hidden" value="..." />.
    – Joe
    Commented Oct 20, 2017 at 13:50
  • There aren't many files in default\default; you can always download the source from magento.com to compare if you're not sure. If you're not familiar with Magento's fallback system, you should read up on it as it'll help you immensely. Basically, if it doesn't find the file in default/default, it'll fallback and use the one from base/default. So you can copy cart.phtml from base/default to default/default (or whatever package/theme you have configured) and edit it there.
    – Joe
    Commented Oct 20, 2017 at 13:51

1 Answer 1


Okay I found the problem, so after reading the code over and over again I noticed that I was missing my formkey in my cart.phtml which is located in : /app/design/frontend/default/yourtheme/template/checkout/

on line 50 after getUrl('checkout/cart/updatePost') ?>" method="post">

paste the below code

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

Your Answer

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

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