I am working on a collection query of categories:
$categories_check = Mage::getModel('catalog/category')
->getCollection()
->setStoreId($storeId)
->addFieldToFilter('is_active', 1)
->addAttributeToFilter('path', array('like' => "1/{$rootCategoryId}/%"))
->setProductStoreId($storeId)
->setLoadProductCount(1)
->addAttributeToSelect('*');
It returns the categories below root category $rootCategoryId
. My requirement is to change this query, that it works for an array of root categories.
Like when I pass the array $rootcat = array('15,20,25,35');
it provides me categories below these root categories.