Get manufacturers (and any attribute) list

Last modified by sysk on Thu, June 24, 2010 16:49
Source|Old Revisions  

This is an old revision of the document!


$product = Mage::getModel(’catalog/product’); $attributes = Mage::getResourceModel(’eav/entity_attribute_collection’) →setEntityTypeFilter($product→getResource()→getTypeId()) →addFieldToFilter(’attribute_code’, ‘manufacturer’) // This can be changed to any attribute code →load(false); $attribute = $attributes→getFirstItem()→setEntity($product→getResource()); /* @var $attribute Mage_Eav_Model_Entity_Attribute */ $manufacturers = $attribute→getSource()→getAllOptions(false);




 

Magento 2 GitHub Repository

Magento Job Board - Some sort of tag line goes here

Latest Posts| View all Jobs