开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜