Public Member Functions | |
setAddress (Mage_Sales_Model_Quote_Address $address) | |
getAddress () | |
getQuote () | |
importQuoteItem (Mage_Sales_Model_Quote_Item $quoteItem) | |
getOptionBycode ($code) | |
Protected Member Functions | |
_construct () | |
_beforeSave () | |
Protected Attributes | |
$_address | |
$_quote |
Definition at line 28 of file Item.php.
_beforeSave | ( | ) | [protected] |
Processing object before save data
Reimplemented from Mage_Sales_Model_Quote_Item_Abstract.
Definition at line 43 of file Item.php.
00044 { 00045 parent::_beforeSave(); 00046 if ($this->getAddress()) { 00047 $this->setQuoteAddressId($this->getAddress()->getId()); 00048 } 00049 return $this; 00050 }
_construct | ( | ) | [protected] |
Enter description here...
Reimplemented from Varien_Object.
Definition at line 38 of file Item.php.
00039 { 00040 $this->_init('sales/quote_address_item'); 00041 }
getAddress | ( | ) |
Retrieve address model
Definition at line 70 of file Item.php.
getOptionBycode | ( | $ | code | ) |
getQuote | ( | ) |
Retrieve quote model instance
Reimplemented from Mage_Sales_Model_Quote_Item_Abstract.
Definition at line 80 of file Item.php.
importQuoteItem | ( | Mage_Sales_Model_Quote_Item $ | quoteItem | ) |
Definition at line 86 of file Item.php.
00087 { 00088 $this->_quote = $quoteItem->getQuote(); 00089 $this->setQuoteItem($quoteItem) 00090 ->setQuoteItemId($quoteItem->getId()) 00091 ->setProductId($quoteItem->getProductId()) 00092 ->setProduct($quoteItem->getProduct()) 00093 ->setSku($quoteItem->getSku()) 00094 ->setName($quoteItem->getName()) 00095 ->setDescription($quoteItem->getDescription()) 00096 ->setWeight($quoteItem->getWeight()) 00097 ->setPrice($quoteItem->getPrice()) 00098 ->setCost($quoteItem->getCost()); 00099 00100 if (!$this->hasQty()) { 00101 $this->setQty($quoteItem->getQty()); 00102 } 00103 $this->setQuoteItemImported(true); 00104 return $this; 00105 }
setAddress | ( | Mage_Sales_Model_Quote_Address $ | address | ) |
Declare address model
Mage_Sales_Model_Quote_Address | $address |
Definition at line 58 of file Item.php.
00059 { 00060 $this->_address = $address; 00061 $this->_quote = $address->getQuote(); 00062 return $this; 00063 }