2014-08-07

Filter categories by store

Getting categories from specific store:
$storeId = 5;
$categoryId = Mage::app()->getStore($storeId)->getRootCategoryId();
$categories = Mage::getModel('catalog/category')->getCollection()
->addFieldToFilter('path', array('like'=> "1/$categoryId/%"))

No comments:

Post a Comment