magento 获取当前所在的目录ID:
方法一:
$curLayer = Mage::getSingleton(‘catalog/layer’);
$curCategory =
$curLayer
->getCurrentCategory();
$curCategoryId=
$curCategory
->getId();
方法二:
$curCategoryId = Mage::registry('current_category')->getId();
转载于:https://blog.51cto.com/hansome/855485