B-219 Sec-55 Noida, India
+918010221733

Display List Of All Manufacturers In Magento

Suppose you want to display the list of all the Manufactures. Use the code below to display the Manufacture

<?php
$product = Mage::getModel(‘catalog/product’);
   
$attributes = Mage::getResourceModel(‘eav/entity_attribute_collection’)
                  ->setEntityTypeFilter($product->getResource()->getTypeId())
                  ->addFieldToFilter(‘attribute_code’, ‘manufacturer’);

$attribute = $attributes->getFirstItem()->setEntity($product->getResource());
$manufacturers = $attribute->getSource()->getAllOptions(false);
     
echo “<pre>”;
    print_r($manufacturers);
echo “</pre>”;

?>

(Visited 59 times, 1 visits today)

Leave a reply

You must be logged in to post a comment.