Quantcast
Channel: Magento Expert » php
Viewing all articles
Browse latest Browse all 36

I wish to remove the welcome message whenever any user logged in or logged out in Magento?

$
0
0

I just want to display this “Thanks for visiting store!” every time, whenever customers logged in or logged out.

At this time, whenever a user is logging in, it states “Welcome, firstname lastname!”. Also, after logged in displaying that message, another message is displayed like

this “(Not firstname lastname?)”

I wish to remove above mentioned both things from the header.

I visited /app/code/core/Mage/Page/Block/Html/Header.php and transformed this little bit of code in the very finish from the file:
public function getWelcome()
{
    if (empty($this->_data['welcome'])) {
        if (Mage::isInstalled() && Mage::getSingleton(‘customer/session’)->isLoggedIn()) {
            $this->_data['welcome'] = Mage::getStoreConfig(‘design/header/welcome’);
        } else {
            $this->_data['welcome'] = Mage::getStoreConfig(‘design/header/welcome’);
        }
    }

    return $this->_data['welcome'];
}

Transformed that into as follows:
public function getWelcome()
{
    if (empty($this->_data['welcome'])) {
        $this->_data['welcome'] = Mage::getStoreConfig(‘design/header/welcome’);
    }
    return $this->_data['welcome'];
}

I figured this could have the desired effect; also it did once the user logs in. However I think once the user ticks the “Remember Me []” when signing in, this is the

cause of displaying the message that states “Welcome, firstname lastname!” is still appearing.

I am totally confused now, I am unsure preventing this “Welcome signed in user” and “Not this user?” message disappear – I simply wish the standard message to display

like “Welcome to the Store!” or “Thanks for visiting Store!” message to be displayed whenever any user logged in or logged out.

Any assistance would be appreciated.

The post I wish to remove the welcome message whenever any user logged in or logged out in Magento? appeared first on Magento Expert.


Viewing all articles
Browse latest Browse all 36

Trending Articles