How to Get First Label & Second Label Category in Magento 1
Solution For First Label:
getCollection()->addAttributeToSelect("name")
->addAttributeToFilter("is_active", "1")->addAttributeToFilter('level','2')->setLoadProductCount(true)->setProductStoreId($store);
echo '<'pre'>';print_r($_categories->getData());
?>
Solution For Second Label:
<, getCollection()->addAttributeToSelect("name")
->addAttributeToFilter("is_active", "1")->addAttributeToFilter('level','2')->setLoadProductCount(true)->setProductStoreId($store);
echo '<'pre'>';print_r($_categories->getData());
?>
Get Multiple Categories By Id's:
getCollection()->addAttributeToFilter('entity_id', array('in'=>$categoryIds))
->addAttributeToSelect("name")->addAttributeToFilter("is_active", "1")->setLoadProductCount(true)->setProductStoreId($store);
echo '<'pre'>';print_r($_categories->getData());
?>
Conclusion:
You can use the code in Magento development. Please share your reviews in the comment section.
Comments