2010-10-19 115 views
3

在此先感謝在Magento中如何在產品網格中顯示自定義屬性..?

我已經作出一個屬性與肯定的選項/不,我想在管理方面的產品表格顯示這一點,我在網格中進行的列,把下面的代碼

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

?> 

這裏approvedcustomer是屬性,它包含選項是/否 但在網格它顯示了0和1我該怎麼讓已批准和未批准insted的0和1 ..

對不起我的英語水平,

再次感謝。

Jeet。

回答

6

您應爲您的列指定「選項」類型。

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

感謝它解決了我的問題你很棒..! – Jitendra 2010-10-19 06:34:09

相關問題