سؤال

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

هل كانت مفيدة؟

المحلول

$activeCategories = Mage::getResourceModel('catalog/category_collection')
    ->addAttributeToFilter('is_active', 1)
    ->getColumnValues('entity_id');
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى magento.stackexchange
scroll top