Magento: Add Manufacturer Column to Admin Product Grid

Magento Icon

A client requested to add a column to the product grid in the admin so that they could filter by manufacturer. It would be great if Magento made this more simple to do, but it’s not that bad to just do it manually. Instead of creating a whole module to do this, I’m just overriding one file. You can make a module with it quite easily if you want.

The following was used and tested with Magento

Step 1:
Copy this file: /app/code/core/Mage/Adminhtml/Block/Catalog/Product/Grid.php and paste it here: /app/code/local/Mage/Adminhtml/Block/Catalog/Product/Grid.php. This will override the core file with your own without actually modifying core code.

Step 2:
By looking at this file, you will clearly see how Magento is setting up the columns. Find where you want to put the Manufacturer column, and paste the following code:

$manufacturer_items = Mage::getModel('eav/entity_attribute_option')->getCollection()->setStoreFilter()->join('attribute','attribute.attribute_id=main_table.attribute_id', 'attribute_code');
        foreach ($manufacturer_items as $manufacturer_item) :
            if ($manufacturer_item->getAttributeCode() == 'manufacturer')
                $manufacturer_options[$manufacturer_item->getOptionId()] = $manufacturer_item->getValue();
                'header'=> Mage::helper('catalog')->__('Manufacturer'),
                'width' => '100px',
                'type'  => 'options',
                'index' => 'manufacturer',
                'options' => $manufacturer_options

Step 3:
Enjoy your new column. Props to wolfdog85 for helping me figure out the code. The original forum post can be found here.

This entry was posted in Magento. Bookmark the permalink.

23 Responses to Magento: Add Manufacturer Column to Admin Product Grid

  1. theobaldus says:

    With this solution when I search products by name values for manufacturer disappears. I definitely miss something. Other filter works fine. Thank you!

  2. Pingback: Magento: Add Manufacturer Column to Admin Product Grid | WebFixNow

  3. David says:

    Works in 1.8.1!

    Thank you!!!

  4. ttorch says:

    Lovely! XD

  5. Dave Lyons says:

    We implemented this in one store, great job, manufacturer filters perfectly, for us though, by default, the manufacturer for each product is not displayed until the filter has been used.

    Should the manufacturer be displayed by default or is additional code required for this? Thanks.

  6. Ben Brook says:

    Hi! a piece of code is great. We needed to add several attributes to the product grid and finally choosed Amasty product to do that.
    If interested try it

  7. juergens says:


    Thank you Josh for sharing your knowledge. Works like a charm here in!

  8. Jignesh says:


    This is working for me, but only when we have default grid. I have added column wtih ‘color_code’ attribute as per my need. See its working :

    But when I filter the products with for example name of the product, the color code column not displaying correct values see:

    Has anybody tested that ?

  9. john says:

    Hey so great !

    work fine in 1.7.02…..

    You make my day!

  10. Abhijit Patel says:

    Its work fine for me to


  11. Marc says:

    Thanks! Had been the missing link for me. Just worked.

  12. Hi,

    i tried to add a new column for my attribute and did exactly as you guys has mentioned here.but i it fetches no value for that particular attribute. can you guys help me here.


  13. Chris says:

    mad props

  14. brd says:

    added this


    protected function _prepareCollection()
    $store = $this->_getStore();
    $collection = Mage::getModel(‘catalog/product’)->getCollection()

    works great now

  15. brd says:

    Changed from manufacturer to condition for what I needed. Worked great in adding the column and showing the options in the dropdown menu (new, used). Unfortunately it only shows in the column near a product if I select New or Used from dropdown, if I don’t select from dropdown all columns stay blank. Does something also need to be added to by default show the option selected in each row?

    Here’s what I added:

    $condition_items = Mage::getModel(‘eav/entity_attribute_option’)->getCollection()->setStoreFilter()->join(‘attribute’,’attribute.attribute_id=main_table.attribute_id’, ‘attribute_code’);
    foreach ($condition_items as $condition_item) :
    if ($condition_item->getAttributeCode() == ‘condition’)
    $condition_options[$condition_item->getOptionId()] = $condition_item->getValue();

    ‘header’=> Mage::helper(‘catalog’)->__(‘Condition’),
    ‘width’ => ’70px’,
    ‘index’ => ‘condition’,
    ‘type’ => ‘options’,
    ‘options’ => $condition_options

    Thanks for any help!

  16. sam says:

    Could you do this for ‘cost’ price and how would you do it?

  17. fair says:

    hi Josh

    should this code work with 1.4.1?


    • Josh Pratt says:

      fair – I haven’t even needed to try it on 1.4.1 yet. Try it out. It won’t take long to test it.

      • fair says:

        i did try to add a custom attribute to the grid but the column stays blank…

        does the attribute needs specific setting maybe?

        $page_items = Mage::getModel(‘eav/entity_attribute_option’)->getCollection()->setStoreFilter()->join(‘attribute’,’attribute.attribute_id=main_table.attribute_id’, ‘attribute_code’);
        foreach ($page_items as $page_item) :
        if ($page_item->getAttributeCode() == ‘page’)
        $page_options[$page_item->getOptionId()] = $page_item->getValue();

        ‘header’=> Mage::helper(‘catalog’)->__(‘Page’),
        ‘width’ => ’10px’,
        ‘type’ => ‘options’,
        ‘index’ => ‘page’,
        ‘options’ => $page_options

  18. kurt says:

    can i see the output of this code?

  19. Lloyd says:

    Hey, This is damn sweeet.. Gives you a better feel for the grid. I predicted this was in the mix soon. Sure would be awesome if a flexible grid would allow once to choose which are displayed.. 😉 Very nice writeup and example.