Class Mage_Sales_Model_Quote_Item
Sales Quote Item Model
- Varien_Object
- Mage_Core_Model_Abstract
- Mage_Sales_Model_Quote_Item_Abstract implements Mage_Catalog_Model_Product_Configuration_Item_Interface
- Mage_Sales_Model_Quote_Item
Category: Mage
Copyright: Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
License: Open Software License (OSL 3.0)
Author: Magento Core Team <core@magentocommerce.com>
Located at code/core/Mage/Sales/Model/Quote/Item.php
protected
|
|
protected
Varien_Object
|
|
protected
|
|
public
|
|
public
|
|
protected
integer|float
|
|
public
|
|
public
|
|
public
array
|
|
public
|
|
public
|
|
public
|
|
public
boolean
|
|
public
boolean
|
#
compareOptions( array $options1, array $options2 )
Check if two options array are identical First options array is prerogative Second options array checked against first one |
public
boolean
|
|
public
string
|
|
public
unknown
|
|
public
array
|
|
public
|
|
public
array
|
|
public
array
|
|
public
|
|
public
object
|
#
updateQtyOption( Varien_Object $option, Varien_Object $value )
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. |
public
|
|
protected
|
|
public
|
|
protected
boolean
|
#
_hasModelChanged( )
Checks that item model has data changes. Call save item options if model isn't need to save in DB |
protected
|
|
public
|
|
protected
|
|
public
|
|
public
Varien_Object
|
#
getBuyRequest( )
Returns formatted buy request - object, holding request received from product view page with keys and options for configured product |
protected
|
#
_setHasError( boolean $flag )
Sets flag, whether this quote item has some error associated with it. |
public
|
#
setHasError( boolean $flag )
Sets flag, whether this quote item has some error associated with it. When TRUE - also adds 'unknown' error information to list of quote item errors. When FALSE - clears whole list of quote item errors. It's recommended to use addErrorInfo() instead - to be able to remove error statuses later. |
protected
|
#
_clearErrorInfo( )
Clears list of errors, associated with this quote item. Also automatically removes error-flag from oneself. |
public
|
#
addErrorInfo( string|null $origin = null, integer|null $code = null, string|null $message = null, Varien_Object|null $additionalData = null )
Adds error information to the quote item. Automatically sets error flag. |
public
array
|
|
public
|
#
removeErrorInfosByParams( array $params )
Removes error infos, that have parameters equal to passed in $params. $params
can have following keys (if not set - then any item is good for this key): |
protected
string
|
$_eventPrefix | 'sales_quote_item' |
#
Prefix of model events names |
protected
string
|
$_eventObject | 'item' |
#
Parameter name in event |
protected
|
$_quote |
|
#
Quote model object |
protected
array
|
$_options | array() |
#
Item options array |
protected
array
|
$_optionsByCode | array() |
#
Item options by code cache |
protected
array
|
$_notRepresentOptions | array('info_buyRequest') |
#
Not Represent options |
protected
mixed
|
$_flagOptionsSaved | null |
#
Flag stating that options were successfully saved |
protected
|
$_errorInfos | null |
#
Array of errors associated with this quote item |
$_children,
$_messages,
$_parentItem
|
$_cacheTag,
$_dataSaveAllowed,
$_isObjectNew,
$_resource,
$_resourceCollectionName,
$_resourceName
|