/** * Init collection select * * @return Mage_Core_Model_Resource_Db_Collection_Abstract */ protected function _initSelect() { parent::_initSelect(); // map columns to include table alias $this->addFilterToMap('increment_id', 'main_table.increment_id'); $this->addFilterToMap('store_id', 'main_table.store_id'); $this->addFilterToMap('billing_name', 'main_table.billing_name'); $this->addFilterToMap('shipping_name', 'main_table.shipping_name'); $this->addFilterToMap('base_grand_total', 'main_table.base_grand_total'); $this->addFilterToMap('grand_total', 'main_table.grand_total'); $this->addFilterToMap('status', 'main_table.status'); $this->addFilterToMap('created_at', 'main_table.created_at'); return $this; }
/** * Init select * @return Mage_Core_Model_Resource_Db_Collection_Abstract */ protected function _initSelect() { $this->addFilterToMap('store_id', 'main_table.store_id')->addFilterToMap('created_at', 'main_table.created_at')->addFilterToMap('updated_at', 'main_table.updated_at'); return parent::_initSelect(); }