Wednesday , September 19 2018
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 »

Use Observer In Magento

In magento Observer  catch magento events and run your function after that event. Magento events like  checkout_cart_product_add_after,checkout_cart_save_after etc you can get more magento events from Magento Events Cheat Sheet (1.7.0.0) This way of adding custom event before and after save is useful when we just need to add or do something ...

Read More »
Heap | Mobile and Web Analytics