I am trying to pull category that belongs to current store only but it doesn\'t seem to work. Can anyone see any issue in my code?
$categoryCollection = Mage
I spent a lot of time.... this exaple work for me...
$store = Mage::app()->getStore()->getId();
$rootCategoryId = Mage::app()->getStore()->getRootCategoryId();
$rootpath = Mage::getModel('catalog/category')
->setStoreId($store)
->load($rootCategoryId)
->getPath();
$categories = Mage::getModel('catalog/category')->setStoreId($store)
->getCollection()
->addAttributeToSelect('*')
->addAttributeToFilter('path', array("like"=>$rootpath."/"."%"));
fix for multistore :)
setStoreId - not work, can remove