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”;
}
}
?>

Get current category ID on category page in magento

Get current category ID and name on category page in magento.

We used this code :

<?php echo Mage::getModel(‘catalog/layer’)->getCurrentCategory()->getName(); ?>
<?php echo Mage::getModel(‘catalog/layer’)->getCurrentCategory()->getId(); ?>