Home » Magento7 January 2010

Magento: Get list of all manufacturers

Manufacturer is a core product attribute in Magento. This article shows how you can fetch the manufacturer attribute and all it’s option value and id.

Here is the code to list all the option values of manufacturer attribute:


Here is another way to get manufacturer attribute option values:

Hope it helps. Thanks.


Get New Post by Email

Find me on

FacebookTwitterGoogle+LinkedInRSS Feed
  • a while back i deleted the ‘Manufacturer’ attribute and created a new one and now this code isn’t working for me. Is there a fix so that it will pull the data from the newer attribute?

  • Just put your new attribute code in addFieldToFilter. See the code below:-

    $attributes = Mage::getResourceModel('eav/entity_attribute_collection')
    ->addFieldToFilter('attribute_code', 'YOUR_NEW_ATTRIBUTE_CODE');

  • Karlo

    Hi Mukesh, thank you for the code but where do you put this code? Which file?

  • Jeff

    When l put this into my 1column.phtml l get this error:

    Fatal error: Call to a member function getResource() on a non-object in /var/www/magento/app/design/frontend/default/bookstore/template/page/1column.phtml on line 183

    Can anyone help?

  • This works:

    $collection = Mage::getResourceModel(‘catalog/product_attribute_collection’) ->addFieldToFilter(‘attribute_code’, array(‘eq’=>’manufacturer’))

    foreach($collection as $a){
    $manufArray = $a->getSource()->getAllOptions(false);
    foreach($a->getSource()->getAllOptions(false) as $option)
    $manufArray[$option[‘value’]] = $option[‘label’];


  • i want to edit the manufacturer list in product information page. i added the a manufacturer name in user. Now i want to show only that manufacturer name in product information page.

    i think tabs.php under app\code\core\Mage\Adminhtml\Block\Catalog\Product\Edit helps to bring the general tab and the information on it.

    i think this block of code helps to bring the general tab and the information on it in product information page.

    if (count($attributes)==0) {

    $this->addTab(‘group_’.$group->getId(), array(
    ‘label’ => Mage::helper(‘catalog’)->__($group->getAttributeGroupName()),
    ‘content’ => $this->getLayout()->createBlock($this->getAttributeTabBlock())

    please help me if i want to add or remove manufacturer in product information page with code without changing the attribute information.

  • Mubashar Crewlogix

    It is not workable. It is giving error.