【发布时间】:2012-04-17 12:32:31
【问题描述】:
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);
}
我使用上面的代码在订单列表网格上添加了一个公司字段。 但它显示“已存在具有相同 id “1038”的项目(Mage_Sales_Model_Order)”
【问题讨论】:
标签: magento