I have listed all brands to the main menu using below code and it gives all available brands.
$attributeId = Mage::getResourceModel('eav/entity_attribute')->getIdByCode('catalog_product','brand'); $attribute = Mage::getModel('catalog/resource_eav_attribute')->load($attributeId); $attributeOptions = $attribute->getSource()->getAllOptions();
But, now I wants to load only brands, which related products are is in stock(
qty>=1) to the Main Menu.
So How could I do that?