将列添加到网格(观察者)-where子句中的列“ store_id”含糊不清
我正在使用观察者方法在订单网格中添加一列: 在活动上-> sales_order_grid_collection_load_before我正在向集合中添加一个联接 在事件上-> core_block_abstract_prepare_layout_before我正在向网格添加一列 编辑更多信息: 活动(1): public function salesOrderGridCollectionLoadBefore($observer) { $collection = $observer->getOrderGridCollection(); $collection->addFilterToMap('store_id', 'main_table.store_id'); $select = $collection->getSelect(); $select->joinLeft(array('oe' => $collection->getTable('sales/order')), 'oe.entity_id=main_table.entity_id', array('oe.customer_group_id')); } 活动(2): public function appendCustomColumn(Varien_Event_Observer $observer) { $block = $observer->getBlock(); if (!isset($block)) { return $this; } if ($block->getType() == 'adminhtml/sales_order_grid') { /* @var $block Mage_Adminhtml_Block_Customer_Grid */ …