Sunday, July 8, 2012

How to show only first name in magento welcome message?

$customer = Mage::getSingleton('customer/session')->getCustomer()->getData();
if(Mage::getSingleton('customer/session')->isLoggedIn())
{
echo $this->__('Welcome, %s!', $customer['firstname']);
}
else
{
echo $this->__('Welcome Guest');
}

No comments:

Post a Comment

Please mention your comments.......