How to Check Current Category has Child Category or not in Magento In this post i will show you how you can get the list of subcategories of a category….
Read More
How to Check Current Category has Child Category or not in Magento In this post i will show you how you can get the list of subcategories of a category….
Checking admin is logged in or not in Magento You can check easily the admin is loged in or not by this simple code snippets.
1 2 3 4 5 6 7 8 9 |
$adminsession = Mage::getSingleton('admin/session', array('name'=>'adminhtml')); if($adminsession->isLoggedIn()) { echo "Admin is logged in"; } else { echo "Admin is Not logged in"; } |
Check customer is logged in or not in Magento You can check easily the customer is loged in or not by this simple code snippets.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
$session=Mage::getSingleton('customer/session', array('name'=>'frontend') ); if ($session->isLoggedIn()) { echo "customer is logged in"; } else { echo "Customer is Not logged in"; } //Another Way to Do this : if ($this->helper('customer')->isLoggedIn() ) { echo "customer is logged in"; } else { echo "customer is Not logged in"; } |
Commands for How to Flush, Enable, Disable Cache Command Line in Magento 2 This is very common issue/problem for those developer who are using Magento 2. How to Flush, Enable,…