Magento get current customer group id
Magento get current customer group id : Mage::getSingleton(‘customer/session’)->getCustomerGroupId(); is used to get current customer group id.
Syntax: Magento get current customer group id
$isLogin = Mage::getSingleton( 'customer/session' )->isLoggedIn(); if( $isLogin ){ $customerGroupId = Mage::getSingleton('customer/session')->getCustomerGroupId(); }else{ $customerGroupId = ''; }
This will return the current customer’s group id.
Advertisements