Tuesday , December 12 2017
Home >> All tutorial (page 22)

All tutorial

Magento: Get User Details

In this quick tip we will see how we can get details of logged in customer in Magento. You can use below code snippet in any model, controller or phtml file. // Retrieve Session Object $session = Mage::getSingleton(‘customer/session’);   // Check if user is logged in or not. if($session->gt;isLoggedIn())  {    $customer = $session->gt;getCustomer();        // Get Customer ID    echo $customer->gt;getID();      // Get Customer Name    echo $customer->gt;getName();     } Hope it helpful to you!

Read More »
Heap | Mobile and Web Analytics