Attribute dropdown value display in magento products grid

Home / Magento / Attribute dropdown value display in magento products grid

This post useful to display custom attribute dropdown value in products grid in magento admin.

$attribute = Mage::getModel('eav/config')->getAttribute('catalog_product', 'supplier');
$options = array();
foreach( $attribute->getSource()->getAllOptions(true, true) as $option ) {
   $options[$option['value']] = $option['label'];
}
$this->addColumn('supplier',
    array(
        'header'=> Mage::helper('catalog')->__('Supplier'),
        'width' => '80px',
        'index' => 'supplier',
        'type'  => 'options',
        'options' => $options,
));

Related Posts

One Comment

  • Magento developers many times get confused for designing a website in a unique way. After visiting this article, one can easily get the overview of designing a particular Ecommerce website. As the matter of fact, various platforms require different kinds of designs for better engagement of a product. So after visiting here, one can easily get the best overview of designing a website.

Leave a Reply to Forutne Jack Review Cancel reply

Your email address will not be published. Required fields are marked *