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
<reference name="header"> <block type="customer/form_login" name="mini_login" template="customer/form/mini.login.phtml" /> </reference>
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:
protected function _prepareLayout() { //$this->getLayout()->getBlock('head')->setTitle(Mage::helper('customer')->__('Customer Login')); return parent::_prepareLayout(); }
That’s all!
6 Comments
Curtis Worthington · April 25, 2013 at 3:39 pm
This solved the problem. Amazing, Thank you very much for posting this. Curtis
Timon · September 26, 2014 at 7:48 am
Thanks man! You saved me some time.
Jonas · January 2, 2015 at 3:10 pm
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 · February 3, 2015 at 3:14 pm
Thanks, Jonas. I’ve just changed it.
Jamie · February 28, 2016 at 9:02 pm
Thanks very much for this!
To be accurate for 1.9.2.2 I think the path should be:
…/Mage/Customer/Block/Form/Login.php
Steve · July 17, 2017 at 8:00 am
Is there a Magento 2 solution for this? I am using the Porto theme and some of the pages have Customer Login as the title, mainly the Contact page and successfull order page.