Clearing or Updating Cart Issues Following Magento 1.9 Upgrade

Magento Logo

Magento Community Edition 1.9 is, of course, upon us. Unlike many other platforms, Magento users frequently don’t upgrade quickly due to the relative complexity of the process. That said, there have been several issues that I’ve heard about following the initial upgrade to 1.9. One of these issues is an inability to update or empty the shopping cart on the checkout page. This, obviously, causes significant issues for the customer.

I knew of this to be an oversight of theme developers that occurred with enough frequency that I wasn’t the only one to encounter the problem. When I ran into the problem in CE  1.8.x, it often was because the theme developer had omitted the form key required for the form to validate. This was a simple addition to the checkout form, located in the app > design  > frontend > default > [THEMENAME] > template > checkout > cart.phtml file :

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

In a similar vane, I’ve seen reports of a form element missing in the initial 1.9 upgrade. Based on the research I’ve seen, in the same file, add an input to the checkout form as follows:

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

My guess is that this solution will be as quick and easy as the earlier solution I used in 1.8x. Obviously, move this file to the local directory so as to not hack core.

Based on the descriptions, I’m not certain if this is an issue with Magento core, or if it’s appearing in individual themes only. I haven’t seen it in the wild personally, but it sounds much like what I’ve experienced with Magento previously. Let me know about your experiences with 1.9.

4 Thoughts

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.