Mage_Reports_Model_Mysql4_Customer_Orders_Collection Class Reference

Inheritance diagram for Mage_Reports_Model_Mysql4_Customer_Orders_Collection:

Mage_Reports_Model_Mysql4_Order_Collection Mage_Sales_Model_Entity_Order_Collection Mage_Eav_Model_Entity_Collection_Abstract Varien_Data_Collection_Db Varien_Data_Collection

List of all members.

Public Member Functions

 setDateRange ($from, $to)
 setStoreIds ($storeIds)

Protected Member Functions

 _joinFields ($from= '', $to= '')


Detailed Description

Definition at line 35 of file Collection.php.


Member Function Documentation

_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     }


The documentation for this class was generated from the following file:

Generated on Sat Jul 4 17:24:36 2009 for Magento by  doxygen 1.5.8