0
protected function _prepareCollection()
{
$collection = Mage::getResourceModel($this->_getCollectionClass());
$collection->getSelect()->join('sales_flat_order_address', 'main_table.entity_id = sales_flat_order_address.parent_id',array('company'));
$this->setCollection($collection);
}
我使用上面的代码在订单列表网格上添加公司字段。 但它显示“项目(Mage_Sales_Model_Order)具有相同的ID‘1038’已经存在”Magento Grid添加新列
其工作正常,但现在我有一个与发票网格小问题,我已经在下面的答案中提到的细节。 – p4pravin 2012-04-20 04:10:50