2014-10-07 58 views
1

我要显示在Magento电网市场下拉名字,但我写我的代码,显示市场value.Bellow什么是我的代码如何显示选择名称,而不是价值在Magento电网

protected function _prepareColumns() 
    { 
    $this->addColumn('marketplace', array(
    'header' => Mage::helper('adminhtml')->__('Marketplace'), 
    'align'  =>'right', 
    'width'  => '10px', 
    'index'  => 'marketplace', 
    )); 
    $this->addColumn('action', 
    array(
    'header' => Mage::helper('adminhtml')->__('Action'), 
    'width'  => '100px', 
    'type'  => 'action', 
    'getter' => 'getId', 
    'actions' => array(array(
    'caption' => Mage::helper('adminhtml')->__('Edit'), 
    'url'  => array('base' => '*/*/edit'), 
    'field' => 'id' 
    )), 
    'filter' => false, 
    'sortable' => false, 
    'index'  => 'id', 
    )); 
    return parent::_prepareColumns(); 
    } 

任何人都可以请指出我做错了什么,因为我没有太多的magento经验。

感谢大家提前为市场上像

回答

1

附加字段类型...

$this->addColumn('marketplace', array(
'header' => Mage::helper('adminhtml')->__('Marketplace'), 
'align'  =>'right', 
'width'  => '10px', 
'index'  => 'marketplace' 
'type' => 'options', 
'options' => array(
       6 => '6', 
       5 => '4', 
       4 => '4', 
       3 => '3', 
       2 => '2', 
       1 => '1' 
      ), 
)); 
相关问题