Question

How do I get an array containing the ID's of all active categories?

Était-ce utile?

La solution

$activeCategories = Mage::getResourceModel('catalog/category_collection')
    ->addAttributeToFilter('is_active', 1)
    ->getColumnValues('entity_id');
Licencié sous: CC-BY-SA avec attribution
Non affilié à magento.stackexchange
scroll top