【发布时间】:2014-05-14 06:46:06
【问题描述】:
我在 sales_flat_order 中添加了一个新列(已导出)并在此位置添加 at 文件:
app/code/core/Mage/Adminhtml/Block/Sales/Order/Grid.php
protected function _prepareCollection()
{
$collection = Mage::getResourceModel($this->_getCollectionClass())
->addAttributeToSelect('*')
->joinAttribute('exported','sales/order','sales_flat_order.entity_id',null,'left');
}
protected function _prepareColumns()
{
$this->addColumn('exported', array(
'header' => Mage::helper('sales')->__('Exported'),
'index' => 'exported',
'type' => 'checkbox',
'name' =>'exported',
'value' =>$this->getExported()==1 ? 'true' : 'false',
));
}
之后它显示在管理站点的订单网格上,但它没有显示价值和名称,
我是magento的新手,所以请帮助我, 从 2 天开始卡住。 感谢您的帮助。
【问题讨论】:
标签: magento