无法在magento ce 1.9.2中将自定义字段添加到销售订单网格

时间:2017-07-11 11:17:04

标签: magento magento-1.9

我修改了_prepareCollection方法并添加了左连接 -

$collection->getSelect()->join(
    'sales_flat_order', 
    'main_table.entity_id = sales_flat_order.entity_id', 
    array('tax_order_type')
);

_prepareColumns -

中添加了该列
$this->addColumn('tax_order_type', array(
    'header' => 'Tax Order Type',
    'type'  => 'text',
    'index' => 'tax_order_type',
));
$collection->printLogQuery(true);中的

_prepareCollection为我提供了正确的查询,我也可以使用该查询获取所需的数据。但它不会在网格中显示出来。

1 个答案:

答案 0 :(得分:0)

相关问题