Skip to content

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

September 2, 2011

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/core/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 title of the page:

protected function _prepareLayout()
{
//$this->getLayout()->getBlock('head')->setTitle(Mage::helper('customer')->__('Customer Login'));
return parent::_prepareLayout();
}

That’s all!

Advertisements

From → Errors

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: