Tutorialsplane

Magento get current category id

Magento get current category id
You can get current categeory id as below :

Magento get current category id

$layer = Mage::getSingleton('catalog/layer');
$Category = $layer->getCurrentCategory();
$currentCatId= $Category ->getId(); //will give current categeory id