在Magento中如何在产品网格中显示自定义属性..?

时间:2010-10-19 05:47:07

标签: magento

提前致谢

我做了一个属性,选项是/否我想在管理方面的产品网格中显示这个我在网格中创建了列并放入以下代码

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

?>

此处approvedcustomer是属性,它包含选项yes / no 但是在网格中它显示0和1我如何显示0和1的已批准和未批准的内容..

对不起我的英文,

再次感谢。

截拳道。

1 个答案:

答案 0 :(得分:6)

您应为列指定“选项”类型。

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