Protected Member Functions | |
_initCollection () |
Definition at line 34 of file Order.php.
_initCollection | ( | ) | [protected] |
Reimplemented from Mage_Adminhtml_Helper_Dashboard_Abstract.
Definition at line 37 of file Order.php.
00038 { 00039 $isFilter = $this->getParam('store') || $this->getParam('website') || $this->getParam('group'); 00040 00041 $this->_collection = Mage::getResourceSingleton('reports/order_collection') 00042 ->prepareSummary($this->getParam('period'), 0, 0, $isFilter); 00043 00044 if ($this->getParam('store')) { 00045 $this->_collection->addAttributeToFilter('store_id', $this->getParam('store')); 00046 } else if ($this->getParam('website')){ 00047 $storeIds = Mage::app()->getWebsite($this->getParam('website'))->getStoreIds(); 00048 $this->_collection->addAttributeToFilter('store_id', array('in' => implode(',', $storeIds))); 00049 } else if ($this->getParam('group')){ 00050 $storeIds = Mage::app()->getGroup($this->getParam('group'))->getStoreIds(); 00051 $this->_collection->addAttributeToFilter('store_id', array('in' => implode(',', $storeIds))); 00052 } 00053 00054 $this->_collection->load(); 00055 }