Tuesday, January 15, 2013

Get current logged customer details in magento


>>  $CusSession=mage::getSingleton('customer/session');
    //Checking is logged in customer
    if($CusSession->isLoggedIn())
    {
        $customer    = $CusSession->getCustomer();     // Customer object
        $name        = $customer->getName();
    }

No comments:

Post a Comment