Public Member Functions | |
setDateRange ($from, $to) | |
setStoreIds ($storeIds) | |
Protected Member Functions | |
_joinFields ($from= '', $to= '') |
Definition at line 35 of file Collection.php.
_joinFields | ( | $ | from = '' , |
|
$ | to = '' | |||
) | [protected] |
Definition at line 37 of file Collection.php.
00038 { 00039 $this->joinCustomerName() 00040 ->groupByCustomer() 00041 ->addOrdersCount() 00042 ->addAttributeToFilter('created_at', array('from' => $from, 'to' => $to, 'datetime' => true)); 00043 return $this; 00044 }
setDateRange | ( | $ | from, | |
$ | to | |||
) |
Reimplemented from Mage_Reports_Model_Mysql4_Order_Collection.
Definition at line 46 of file Collection.php.
00047 { 00048 $this->_reset() 00049 ->_joinFields($from, $to); 00050 return $this; 00051 }
setStoreIds | ( | $ | storeIds | ) |
Reimplemented from Mage_Reports_Model_Mysql4_Order_Collection.
Definition at line 53 of file Collection.php.
00054 { 00055 $vals = array_values($storeIds); 00056 if (count($storeIds) >= 1 && $vals[0] != '') { 00057 $this->addAttributeToFilter('store_id', array('in' => (array)$storeIds)); 00058 $this->addSumAvgTotals(1) 00059 ->orderByOrdersCount(); 00060 } else { 00061 $this->addSumAvgTotals() 00062 ->orderByOrdersCount(); 00063 } 00064 00065 return $this; 00066 }