Solving the “Customer Login” title in all pages in Magento

I’m one of those that wanted to add a login form on the sidebar of my Magento. This was really easy, I just add the following line to

[sourcecode language=”xml”]

[/sourcecode]

But after that, every page on my magento store showed the title page as “Customer Login”. This happened to me in Magento EE 1.10 and Magento CE 1.6.

Solving this is really easy, if you know how. Just copy the app/code/core/Mage/Customer/Form/Login.php file in a new folder into your local code, that is, create a app/code/local/Mage/Customer/Form/ and copy there the Login.php file.

After that, modify your new copy of Login.php, look for the _prepareLayout function and comment the line that sets the page title:

[sourcecode language=”php”]protected function _prepareLayout()
{
//$this->getLayout()->getBlock(‘head’)->setTitle(Mage::helper(‘customer’)->__(‘Customer Login’));
return parent::_prepareLayout();
}[/sourcecode]

That’s all!

  1. Reply

    This solved the problem. Amazing, Thank you very much for posting this. Curtis

    • Timon on September 26, 2014 at 7:48 am

    Reply

    Thanks man! You saved me some time.

    • Jonas on January 2, 2015 at 3:10 pm

    Reply

    There is a little mistake in the last path: app/code/local/[core/]Mage/Customer/Form/
    The parts in brackets needs to be removed.

      • Pau on February 3, 2015 at 3:14 pm
      • Author

      Reply

      Thanks, Jonas. I’ve just changed it.

Leave a Reply

Your email address will not be published.