Magento: Add Manufacturer Column to Admin Product Grid
Thanks to Josh Pratt for his post for which this a resurrected copy of from March 11, 2010. This was a tremendously helpful how to post that details how to add the manufacturer column to the Magento Admin Product Grid. I have successfully used this on Magento v1.8 without issue. Thanks.
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.
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(); endforeach; $this->addColumn('manufacturer', array( '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. Once again thanks to Josh's original post.