here is the code paste it into your adminhtml/block/catalog/product/grid.php
$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' => '180px',
'index' => 'manufacturer',
'type' => 'options',
'options' => $manufacturer_options,
));
$group_items = Mage::getModel('eav/entity_attribute_option')->getCollection()->setStoreFilter()->join('attribute','attribute.attribute_id=main_table.attribute_id', 'attribute_code');
foreach ($group_items as $group_item) :
if ($group_item->getAttributeCode() == 'group')
$group_options[$group_item->getOptionId()] = $group_item->getValue();
endforeach;
$this->addColumn('group',
array(
'header'=> Mage::helper('catalog')->__('Group'),
'width' => '180px',
'index' => 'group',
'type' => 'options',
'options' => $group_options,
)); Note:use your attribute code and name
Comments
Post a Comment
Feel Free To Ask...