/** * Retrieve quote items collection * * @param bool $loaded * @return Mage_Eav_Model_Entity_Collection_Abstract */ public function getItemsCollection($useCache = true) { if (is_null($this->_items)) { $this->_items = Mage::getModel('sales/quote_item')->getCollection(); $this->_items->setQuote($this); } return $this->_items; }
/** * Retrieve quote items collection * * @param bool $loaded * @return Mage_Eav_Model_Entity_Collection_Abstract */ public function getItemsCollection($useCache = true) { if ($this->hasItemsCollection()) { return $this->getData('items_collection'); } if (is_null($this->_items)) { $this->_items = Mage::getModel('buyback/quote_item')->getCollection(); $this->_items->setQuote($this); } return $this->_items; }
/** * Retrieve quote items collection * * @param bool $loaded * @return Mage_Eav_Model_Entity_Collection_Abstract */ public function getItemsCollection($loaded = true) { if (is_null($this->_items)) { $this->_items = Mage::getResourceModel('sales/quote_item_collection')->addAttributeToSelect('*')->setQuote($this); if ($this->getId()) { foreach ($this->_items as $item) { $item->setQuote($this); } } else { $this->_items->setQuote($this); } } return $this->_items; }
/** * Retrieve quote items collection * * @param bool $loaded * @return Mage_Eav_Model_Entity_Collection_Abstract */ public function getItemsCollection($useCache = true) { if ($this->hasItemsCollection()) { return $this->getData('items_collection'); } if (is_null($this->_items)) { $this->_items = Mage::getModel('sales/quote_item')->getCollection()->setOrder('created_at', 'desc'); $this->_items->setQuote($this); } return $this->_items; }