4

I use the rwd theme and have added the mini login form to the header as described here. The part in my customer.xml looks like this:

    <customer_logged_out>
    <reference name="header">
            <block type="customer/form_login" name="header_customer_form_mini_login"  template="customer/form/mini.login.phtml"/>
    </reference>
    <!--<reference name="right">
        <block type="customer/form_login" name="customer_form_mini_login" before="-" template="customer/form/mini.login.phtml"/>
    </reference>-->
    <reference name="top.links">
        <action method="addLink" translate="label title" module="customer"><label>Log In</label><url helper="customer/getLoginUrl"/><title>Log In</title><prepare/><urlParams/><position>100</position></action>
    </reference>
    <remove name="reorder"></remove>
</customer_logged_out>

And my header.phtml contains the following:

    <!-- Login -->
    <div id="header-login" class="skip-content">
       <?php echo $this->getChildHtml('header_customer_form_mini_login') ?>
    </div>

The mini form appears as it should, but if I try to login I 'm fowarded to mypage.com/customer/account/login/ and I 'm not logged in. If I use the form at mypage.com/customer/account/login/ (not the one in the header) everything works. My first thought was that something must be wrong with the form action, but both forms (the working and the not working) contain "http://mypage.com/customer/account/loginPost/" as action.

Any thoughts what could be wrong? There are no error messages.

Thanks.

6

It is issue with magento form key .Put a form_key field to mini.login file add below code to magento mini login form

      <input name="form_key" type="hidden"
 value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" />
  • Wow, that was quick. Thanks a lot. Works great. :) – Sven Jul 23 '14 at 11:20

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.