/** * Before collection load * * @return Mage_Catalog_Model_Resource_Category_Collection */ protected function _beforeLoad() { Mage::dispatchEvent($this->_eventPrefix . '_load_before', array($this->_eventObject => $this)); return parent::_beforeLoad(); }
/** * Add tax class id attribute to select and join price rules data if needed * * @return Mage_Catalog_Model_Resource_Product_Collection */ protected function _beforeLoad() { Mage::dispatchEvent('catalog_product_collection_load_before', array('collection' => $this)); return parent::_beforeLoad(); }
/** * Add tax class id attribute to select and join price rules data if needed * * @return Mage_Catalog_Model_Resource_Product_Collection */ protected function _beforeLoad() { Mage::dispatchEvent('catalog_product_collection_load_before', array('collection' => $this)); return parent::_beforeLoad(); // Apply this order by default unless user selects other type of order $ajax = Mage::app()->getRequest()->getQuery('ajax'); if (!isset($ajax)) { $this->getSelect()->reset(Zend_Db_Select::ORDER); $this->getSelect()->order('global_position', 'ASC'); } }