Mage_Sales_Model_Entity_Order_Collection Class Reference

Inheritance diagram for Mage_Sales_Model_Entity_Order_Collection:

Mage_Eav_Model_Entity_Collection_Abstract Varien_Data_Collection_Db Varien_Data_Collection Mage_Reports_Model_Mysql4_Coupons_Collection Mage_Reports_Model_Mysql4_Invoiced_Collection Mage_Reports_Model_Mysql4_Order_Collection Mage_Reports_Model_Mysql4_Refunded_Collection Mage_Reports_Model_Mysql4_Shipping_Collection Mage_Reports_Model_Mysql4_Tax_Collection Mage_Reports_Model_Mysql4_Customer_Orders_Collection Mage_Reports_Model_Mysql4_Customer_Totals_Collection

List of all members.

Public Member Functions

 addItemCountExpr ()

Protected Member Functions

 _construct ()


Detailed Description

Definition at line 35 of file Collection.php.


Member Function Documentation

_construct (  )  [protected]

Initialize collection

Reimplemented from Mage_Eav_Model_Entity_Collection_Abstract.

Reimplemented in Mage_Reports_Model_Mysql4_Tax_Collection.

Definition at line 37 of file Collection.php.

00038     {
00039         $this->_init('sales/order');
00040     }

addItemCountExpr (  ) 

Reimplemented in Mage_Reports_Model_Mysql4_Order_Collection.

Definition at line 42 of file Collection.php.

00043     {
00044         $orderTable = $this->getEntity()->getEntityTable();
00045         $orderItemEntityTypeId = Mage::getResourceSingleton('sales/order_item')->getTypeId();
00046         $this->getSelect()->join(
00047                 array('items'=>$orderTable),
00048                 'items.parent_id=e.entity_id and items.entity_type_id='.$orderItemEntityTypeId,
00049                 array('items_count'=>new Zend_Db_Expr('COUNT(items.entity_id)'))
00050             )
00051             ->group('e.entity_id');
00052         return $this;
00053     }


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

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