Sanjoy Roy

[MCM, MCP, SCJP] – Senior PHP Programmer

How to retrieve customer name/firstname in Magento


require_once 'app/Mage.php';
umask(0);
Mage::app('default');
$session = Mage::getSingleton('customer/session');
if($session->isLoggedIn()) {
   $customer = $session->getCustomer();
   echo $customer->getName();
   echo $customer->getFirstname();
}
Advertisements

Comments are closed.

%d bloggers like this: