Class Mage_Sales_Model_Quote_Item

Description

Sales Quote Item Model

Located in /Sales/Model/Quote/Item.php (line 35)

Varien_Object
   |
   --Mage_Core_Model_Abstract
      |
      --Mage_Sales_Model_Quote_Item_Abstract
         |
         --Mage_Sales_Model_Quote_Item
Variable Summary
Method Summary
bool compareOptions (array $options1, array $options2)
Varien_Object getBuyRequest ()
array getOptions ()
array getOptionsByCode ()
string getProductType ()
array getQtyOptions ()
unknown getRealProductType ()
void save ()
Mage_Sales_Model_Quote_Item setQtyOptions ($qtyOptions $qtyOptions)
array toArray ([ $arrAttributes = array()])
object Mage_Catalog_Model_Product_Type_Abstract updateQtyOption ( $option, mixed $value, array $options)
void _construct ()
boolean _hasModelChanged ()
int|float _prepareQty (float|int $qty)
Variables
string $_eventObject = 'item' (line 51)

Parameter name in event

In observe method you can use $observer->getEvent()->getObject() in this case

  • access: protected

Redefinition of:
Mage_Core_Model_Abstract::$_eventObject
Parameter name in event
string $_eventPrefix = 'sales_quote_item' (line 42)

Prefix of model events names

  • access: protected

Redefinition of:
Mage_Core_Model_Abstract::$_eventPrefix
Prefix of model events names
mixed $_flagOptionsSaved = null (line 85)

Flag stating that options were successfully saved

  • access: protected
array $_notRepresentOptions = array('info_buyRequest') (line 79)

Not Represent options

  • access: protected
array $_options = array() (line 65)

Item options array

  • access: protected
array $_optionsByCode = array() (line 72)

Item options by code cache

  • access: protected
Mage_Sales_Model_Quote $_quote (line 58)

Quote model object

  • access: protected

Inherited Variables

Inherited from Mage_Sales_Model_Quote_Item_Abstract

Mage_Sales_Model_Quote_Item_Abstract::$_children
Mage_Sales_Model_Quote_Item_Abstract::$_messages
Mage_Sales_Model_Quote_Item_Abstract::$_parentItem

Inherited from Mage_Core_Model_Abstract

Mage_Core_Model_Abstract::$_cacheTag
Mage_Core_Model_Abstract::$_dataSaveAllowed
Mage_Core_Model_Abstract::$_isObjectNew
Mage_Core_Model_Abstract::$_resource
Mage_Core_Model_Abstract::$_resourceCollectionName
Mage_Core_Model_Abstract::$_resourceName
Methods
addOption (line 483)

Add option to item

  • access: public
addQty (line 153)

Adding quantity to quote item

  • access: public
Mage_Sales_Model_Quote_Item addQty (float $qty)
  • float $qty
checkData (line 244)

Checking item data

  • access: public

Redefinition of:
Mage_Sales_Model_Quote_Item_Abstract::checkData()
Checking item data
compare (line 365)

Compare item

  • access: public
bool compare (Mage_Sales_Model_Quote_Item $item)
compareOptions (line 343)

Check if two options array are identical First options array is prerogative Second options array checked against first one

  • access: public
bool compareOptions (array $options1, array $options2)
  • array $options1
  • array $options2
getBuyRequest (line 671)

Returns formatted buy request - object, holding request received from product view page with keys and options for configured product

  • access: public
Varien_Object getBuyRequest ()
getOptionByCode (line 575)

Get item option by code

  • return: || null
  • access: public
Mage_Sales_Model_Quote_Item_Option getOptionByCode (string $code)
  • string $code
getOptions (line 462)

Get all item options

  • access: public
array getOptions ()
getOptionsByCode (line 472)

Get all item options as array with codes in array key

  • access: public
array getOptionsByCode ()
getProductType (line 406)

Get item product type

  • access: public
string getProductType ()
getQtyOptions (line 202)

Retrieve option product with Qty

Return array 'qty' => the qty 'product' => the product model

  • access: public
array getQtyOptions ()
getQuote (line 129)

Retrieve quote model object

  • access: public

Redefinition of:
Mage_Sales_Model_Quote_Item_Abstract::getQuote()
Retrieve Quote instance
getRealProductType (line 422)

Return real product type of item

  • access: public
unknown getRealProductType ()
removeOption (line 543)

Remove option from item options

  • access: public
Mage_Sales_Model_Quote_Item removeOption (string $code)
  • string $code
representProduct (line 303)

Check product representation in item

  • access: public
bool representProduct (Mage_Catalog_Model_Product $product)
save (line 624)

Save model plus its options

Ensures saving options in case when resource model was not changed

  • access: public
void save ()

Redefinition of:
Mage_Core_Model_Abstract::save()
Save object data
setOptions (line 449)

Initialize quote item options

  • access: public
Mage_Sales_Model_Quote_Item setOptions (array $options)
  • array $options
setProduct (line 262)

Setup product for quote item

  • access: public
setQty (line 175)

Declare quote item quantity

  • access: public
Mage_Sales_Model_Quote_Item setQty (float $qty)
  • float $qty
setQtyOptions (line 234)

Set option product with Qty

  • access: public
Mage_Sales_Model_Quote_Item setQtyOptions ($qtyOptions $qtyOptions)
  • $qtyOptions $qtyOptions
setQuote (line 117)

Declare quote model object

  • access: public
toArray (line 433)

Convert Quote Item to array

  • access: public
array toArray ([ $arrAttributes = array()])
  • array $arrAttributes
updateQtyOption (line 522)

Can specify specific actions for ability to change given quote options values Exemple: cataloginventory decimal qty validation may change qty to int, so need to change quote item qty option value.

  • access: public
object Mage_Catalog_Model_Product_Type_Abstract updateQtyOption ( $option, mixed $value, array $options)
  • array $options
  • Varien_Object $option
  • mixed $value
_addOptionCode (line 558)

Register option code

  • access: protected
_afterSave (line 641)

Save item options after item saved

  • access: protected

Redefinition of:
Mage_Core_Model_Abstract::_afterSave()
Processing object after save data
_beforeSave (line 101)

Quote Item Before Save prepare data process

  • access: protected

Redefinition of:
Mage_Sales_Model_Quote_Item_Abstract::_beforeSave()
Specify parent item id before saving data
_construct (line 91)

Initialize resource model

  • access: protected
void _construct ()
_hasModelChanged (line 589)

Checks that item model has data changes.

Call save item options if model isn't need to save in DB

  • access: protected
boolean _hasModelChanged ()

Redefinition of:
Mage_Core_Model_Abstract::_hasModelChanged()
Check whether model has changed data.
_prepareQty (line 140)

Prepare quantity

  • access: protected
int|float _prepareQty (float|int $qty)
  • float|int $qty
_saveItemOptions (line 603)

Save item options

  • access: protected
Mage_Sales_Model_Quote_Item _saveItemOptions ()
__clone (line 652)

Clone quote item

  • access: public

Redefinition of:
Mage_Sales_Model_Quote_Item_Abstract::__clone()
Clone quote item

Inherited Methods

Inherited From Mage_Sales_Model_Quote_Item_Abstract

Mage_Sales_Model_Quote_Item_Abstract::addChild()
Mage_Sales_Model_Quote_Item_Abstract::addMessage()
Mage_Sales_Model_Quote_Item_Abstract::calcRowTotal()
Mage_Sales_Model_Quote_Item_Abstract::calcTaxAmount()
Mage_Sales_Model_Quote_Item_Abstract::checkData()
Mage_Sales_Model_Quote_Item_Abstract::getBaseCalculationPrice()
Mage_Sales_Model_Quote_Item_Abstract::getBaseOriginalPrice()
Mage_Sales_Model_Quote_Item_Abstract::getBaseTaxAmount()
Mage_Sales_Model_Quote_Item_Abstract::getCalculationPrice()
Mage_Sales_Model_Quote_Item_Abstract::getChildren()
Mage_Sales_Model_Quote_Item_Abstract::getConvertedPrice()
Mage_Sales_Model_Quote_Item_Abstract::getFileDownloadParams()
Mage_Sales_Model_Quote_Item_Abstract::getIsNominal()
Mage_Sales_Model_Quote_Item_Abstract::getMessage()
Mage_Sales_Model_Quote_Item_Abstract::getOriginalPrice()
Mage_Sales_Model_Quote_Item_Abstract::getParentItem()
Mage_Sales_Model_Quote_Item_Abstract::getPrice()
Mage_Sales_Model_Quote_Item_Abstract::getProduct()
Mage_Sales_Model_Quote_Item_Abstract::getQty()
Mage_Sales_Model_Quote_Item_Abstract::getQuote()
Mage_Sales_Model_Quote_Item_Abstract::getStore()
Mage_Sales_Model_Quote_Item_Abstract::getTaxAmount()
Mage_Sales_Model_Quote_Item_Abstract::getTotalQty()
Mage_Sales_Model_Quote_Item_Abstract::isChildrenCalculated()
Mage_Sales_Model_Quote_Item_Abstract::isNominal()
Mage_Sales_Model_Quote_Item_Abstract::isShipSeparately()
Mage_Sales_Model_Quote_Item_Abstract::setConvertedPrice()
Mage_Sales_Model_Quote_Item_Abstract::setCustomPrice()
Mage_Sales_Model_Quote_Item_Abstract::setMessage()
Mage_Sales_Model_Quote_Item_Abstract::setOriginalPrice()
Mage_Sales_Model_Quote_Item_Abstract::setParentItem()
Mage_Sales_Model_Quote_Item_Abstract::setPrice()
Mage_Sales_Model_Quote_Item_Abstract::_beforeSave()
Mage_Sales_Model_Quote_Item_Abstract::_calculatePrice()
Mage_Sales_Model_Quote_Item_Abstract::__clone()

Inherited From Mage_Core_Model_Abstract

Mage_Core_Model_Abstract::afterCommitCallback()
Mage_Core_Model_Abstract::afterLoad()
Mage_Core_Model_Abstract::cleanModelCache()
Mage_Core_Model_Abstract::clearInstance()
Mage_Core_Model_Abstract::delete()
Mage_Core_Model_Abstract::getCacheIdTags()
Mage_Core_Model_Abstract::getCacheTags()
Mage_Core_Model_Abstract::getCollection()
Mage_Core_Model_Abstract::getEntityId()
Mage_Core_Model_Abstract::getId()
Mage_Core_Model_Abstract::getIdFieldName()
Mage_Core_Model_Abstract::getResource()
Mage_Core_Model_Abstract::getResourceCollection()
Mage_Core_Model_Abstract::getResourceName()
Mage_Core_Model_Abstract::isObjectNew()
Mage_Core_Model_Abstract::load()
Mage_Core_Model_Abstract::save()
Mage_Core_Model_Abstract::setId()
Mage_Core_Model_Abstract::_afterDelete()
Mage_Core_Model_Abstract::_afterDeleteCommit()
Mage_Core_Model_Abstract::_afterLoad()
Mage_Core_Model_Abstract::_afterSave()
Mage_Core_Model_Abstract::_afterSaveCommit()
Mage_Core_Model_Abstract::_beforeDelete()
Mage_Core_Model_Abstract::_beforeLoad()
Mage_Core_Model_Abstract::_beforeSave()
Mage_Core_Model_Abstract::_clearData()
Mage_Core_Model_Abstract::_clearReferences()
Mage_Core_Model_Abstract::_getEventData()
Mage_Core_Model_Abstract::_getResource()
Mage_Core_Model_Abstract::_hasModelChanged()
Mage_Core_Model_Abstract::_init()
Mage_Core_Model_Abstract::_protectFromNonAdmin()
Mage_Core_Model_Abstract::_setResourceModel()

Documentation generated on Fri, 11 Feb 2011 17:07:09 +0200 by phpDocumentor 1.4.3