How To Show Page for Particular User Group In Magento

Show Page for Particular User Group In Magento

<?php
////Check if User is Logged In
$login = Mage::getSingleton(‘customer/session’)->isLoggedIn();
if($login){
//Get Customers Group ID
$groupId = Mage::getSingleton(‘customer/session’)->getCustomerGroupId();
//My wholesale customer id was 2
if($groupId == 2){
echo “wholesale Customer”;
}else{
echo “Not a wholesale Customer”;
}
}
?>

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *