开发者

In Magento how to show custom attribute in product grid ..?

开发者 https://www.devze.com 2023-01-21 10:20 出处:网络
Thanks in advance i have made one attribute with option of yes/no i want to show this in product grid at admin side i made the column in the grid and put the following code

Thanks in advance

i have made one attribute with option of yes/no i want to show this in product grid at admin side i made the column in the grid and put the following code

<?php
$this->addColumn('approvedcustomer',
            array(
                'header'=> Mage::helper('catalog')->__('UrgeStatus'),
                'index' => 'approvedcustomer',
        ));

?>

here approvedcustomer is attribute and it contains option yes/no but i开发者_开发知识库n grid it shows 0 and 1 how can i show Approved and Unapproved insted of 0 and 1..

sorry for my english,

thanks once again.

Jeet.


You should assign "options" type for your column.

$this->addColumn('approvedcustomer',
    array(
        'header'=> Mage::helper('catalog')->__('UrgeStatus'),
        'index' => 'approvedcustomer',
        'type'  => 'options',
        'options' => array(
            0 => 'No',
            1 => 'Yes',
        )
));
0

精彩评论

暂无评论...
验证码 换一张
取 消