I have recently upgraded to 1.8.1 and am fairly new to magento. All other aspects of my site seems to be working just fine, however when a customer with an existing account adds item to the cart and goes to checkout, and then is presented with the one page section: ‘Already registered? Log in below:’ the login button redirects to the ‘Login or Create an Account’ page. Once logged in through there the customer can then go through the checkout process again and orders can be placed, but it is far more hassle than it needs to be!

Any help would be greatly appreciated!

N.B: Website is https://astuteclothing.co.uk

3 Answers 3


I had the exact same problem. I bought a template for 1.7.2, not knowing I just installed version 1.8.1.

One of the things I had trouble with was this situation. The fix is not that hard.

In the app/design/frontend/default/[themename]/template/persistent/checkout/onepage/login.phtml you will have to add a signle line.

Find <ul class="form-list"> and add:

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

I also had to do the same in app/design/frontend/default/[themename]/template/persistent/customer/form/login.phtml .

  • Ah that did the trick! Thank you ever so much, you've saved me a serious headache!!
    – Dave
    Jan 12, 2014 at 23:38
  • Still not working in chrome,,, but all other browsers working.
    – Gem
    Apr 27, 2018 at 6:57

This worked to fix the issue for me. Note that the <ul class="form-list"> occurs twice in the onepage login.phtml file, and you have to add the form_key input in both places. Also, the there's a 'php' missing from the line as shown above (at least I'm assuming that's required). It should read:

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

Hope this helps someone else who is having this issue.

  • May i know why i need to add this line, is Magento recommend?
    – Gem
    Apr 27, 2018 at 6:58

It would appear that there maybe something wrong with your customer session that is created on login, do you have some custom code for login?

The onepage checkout login block checks if the customer is logged in during the construct. Mage_Checkout_Block_Onepage_Login

protected function _construct()
    if (!$this->isCustomerLoggedIn()) {
        $this->getCheckout()->setStepData('login', array('label'=>Mage::helper('checkout')->__('Checkout Method'), 'allow'=>true));

The isCustomerLoggedIn function just checks the current customer session. I would suggest to debug here first to see if there is anything wrong.


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