Documentation

Mage_Sales_Model_Quote_Item extends Mage_Sales_Model_Quote_Item_Abstract
in package

Quote item abstract model

Table of Contents

Properties

$_cacheTag  : string|bool|array<string|int, mixed>
Model cache tag for clear cache in after save and after delete
$_children  : array<string|int, mixed>
Children items in bundle product, configurable product, etc.
$_data  : array<string|int, mixed>|null
Object attributes
$_dataSaveAllowed  : bool
Flag which can stop data saving after before save Can be used for next sequence: we check data in _beforeSave, if data are not valid - we can set this flag to false value and save process will be stopped
$_dirty  : array<string|int, mixed>
$_errorInfos  : Mage_Sales_Model_Status_List
Array of errors associated with this quote item
$_eventObject  : string
Parameter name in event
$_eventPrefix  : string
Prefix of model events names
$_flagOptionsSaved  : mixed
Flag stating that options were successfully saved
$_hasDataChanges  : bool
Data changes flag (true after setData|unsetData call)
$_idFieldName  : string
Name of object id field
$_isDeleted  : bool
Object delete flag
$_isObjectNew  : bool|null
Flag which allow detect object state: is it new object (without id) or existing one (with id)
$_messages  : array<string|int, mixed>
$_notRepresentOptions  : array<string|int, mixed>
Not Represent options
$_oldFieldsMap  : array<string|int, mixed>
Map short fields names to its full names
$_options  : array<string|int, mixed>
Item options array
$_optionsByCode  : array<string|int, mixed>
Item options by code cache
$_origData  : array<string|int, mixed>|null
Original data that was loaded
$_parentItem  : Mage_Sales_Model_Quote_Item_Abstract|null
Parent item for sub items for bundle product, configurable product, etc.
$_quote  : Mage_Sales_Model_Quote|null
Quote model object
$_resource  : Mage_Core_Model_Resource_Db_Abstract
Resource model instance
$_resourceCollectionName  : string
Name of the resource collection model
$_resourceName  : string
Name of the resource model
$_syncFieldsMap  : mixed
Map of fields to sync to other fields upon changing their data
$_underscoreCache  : array<string|int, mixed>
Setter/Getter underscore transformation cache

Methods

__call()  : mixed
Set/Get attribute wrapper
__clone()  : mixed
Clone quote item
__construct()  : mixed
Constructor
__get()  : mixed
Attribute getter (deprecated)
__set()  : mixed
Attribute setter (deprecated)
__toArray()  : array<string|int, mixed>
Convert object attributes to array
_getResource()  : Mage_Sales_Model_Resource_Quote_Item
Get resource instance
addChild()  : $this
Add child item
addData()  : $this
Add data to the object.
addErrorInfo()  : $this
Adds error information to the quote item.
addMessage()  : $this
Add message of quote item to array of messages
addOption()  : $this
Add option to item
addQty()  : $this
Adding quantity to quote item
afterCommitCallback()  : $this
Callback function which called after transaction commit in resource model
afterLoad()  : $this
Object after load processing. Implemented as public interface for supporting objects after load in collections
calcRowTotal()  : $this
Calculate item row total price
calcTaxAmount()  : $this
Calculate item tax amount
checkData()  : $this
Checking item data
cleanModelCache()  : $this
Remove model object related cache
clearInstance()  : $this
Clearing object for correct deleting by garbage collector
clearMessage()  : $this
Clears all messages
compare()  : bool
Compare item
compareOptions()  : bool
Check if two options array are identical First options array is prerogative Second options array checked against first one
dataHasChangedFor()  : bool
Compare object data with original data
debug()  : string|array<string|int, mixed>
Present object data as string in debug mode
delete()  : $this
Delete object from database
flagDirty()  : $this
getAdditionalData()  : string|null
getAddress()  : Mage_Sales_Model_Quote_Address|null
getAppliedRuleIds()  : string|null
getBaseCalculationPrice()  : float
Get calculation price used for quote calculation in base currency.
getBaseCalculationPriceOriginal()  : float
Get original calculation price used for quote calculation in base currency.
getBaseCost()  : float|null
getBaseDiscountAmount()  : float|null
getBaseDiscountCalculationPrice()  : float|null
getBaseHiddenTaxAmount()  : float|null
getBaseOriginalDiscountAmount()  : float|null
getBaseOriginalPrice()  : float|null
getBasePrice()  : float|null
getBasePriceInclTax()  : float|null
getBaseRowTax()  : float|null
getBaseRowTotal()  : float|null
getBaseRowTotalInclTax()  : float|null
getBaseRowTotalWithDiscount()  : float|null
getBaseShippingAmount()  : float|null
getBaseTaxableAmount()  : float|null
getBaseTaxAmount()  : float|null
getBaseTaxBeforeDiscount()  : float|null
getBaseWeeeDiscount()  : float|null
getBaseWeeeTaxAppliedAmount()  : float|null
getBaseWeeeTaxAppliedRowAmount()  : float|null
getBaseWeeeTaxDisposition()  : float|null
getBaseWeeeTaxRowDisposition()  : float|null
getBillingAddress()  : Mage_Customer_Model_Address_Abstract|null
getBuyRequest()  : DataObject
Returns formatted buy request - object, holding request received from product view page with keys and options for configured product
getCacheIdTags()  : array<string|int, mixed>|false
Get cache tags associated with object id
getCacheTags()  : array<string|int, mixed>|false
Get list of cache tags applied to model object.
getCalculationPrice()  : float
Get item price used for quote calculation process.
getCalculationPriceOriginal()  : float
Get item price used for quote calculation process.
getChildren()  : array<string|int, Mage_Sales_Model_Quote_Item_Abstract>
Get child items
getCollection()  : Mage_Sales_Model_Resource_Quote_Item_Collection
getConvertedPrice()  : float
Get item price converted to quote currency
getCost()  : float|null
getCreatedAt()  : string|null
getCustomPrice()  : float|null
getData()  : mixed
Object data getter
getDataByKey()  : mixed
Get object data by particular key
getDataByPath()  : mixed
Get object data by path
getDataSetDefault()  : mixed
Fast get data or set default if value is not available
getDataUsingMethod()  : mixed
Get object data by key with calling getter method
getDescription()  : string|null
getDiscountAmount()  : float|null
Get discount amount with proper float casting DBAL returns DECIMAL as string, so we cast to float
getDiscountCalculationPrice()  : float|null
getDiscountPercent()  : float|null
getDiscountTaxCompensation()  : float|null
getEntityId()  : int
getErrorInfos()  : array<string|int, mixed>
Retrieves all error infos, associated with this item
getFileDownloadParams()  : null|DataObject
Returns special download params (if needed) for custom option with type = 'file' Needed to implement Mage_Catalog_Model_Product_Configuration_Item_Interface.
getFreeShipping()  : bool|float
getGiftMessageId()  : int|null
getHasChildren()  : bool|null
getHasConfigurationUnavailableError()  : bool|null
getHasError()  : bool|null
getHiddenTaxAmount()  : float|null
getId()  : int|string|null
Retrieve model object identifier
getIdFieldName()  : string
Retrieve identifier field name for model
getIsPriceInclTax()  : bool|null
getIsQtyDecimal()  : bool|null
getIsVirtual()  : bool|null
getItemId()  : int|null
getMessage()  : array<string|int, mixed>|string
Get messages array of quote item
getName()  : string|null
getNoDiscount()  : bool|null
getOptionByCode()  : Mage_Sales_Model_Quote_Item_Option|null
Get item option by code
getOptions()  : array<string|int, mixed>
Get all item options
getOptionsByCode()  : array<string|int, mixed>
Get all item options as array with codes in array key
getOrigData()  : mixed
Get object loaded data (original data)
getOriginalCustomPrice()  : float|null
getOriginalDiscountAmount()  : float|null
getOriginalPrice()  : float
Get original price (retrieved from product) for item.
getParentItem()  : Mage_Sales_Model_Quote_Item_Abstract|null
Get parent item
getParentItemId()  : int|null
getPrice()  : float|null
getPriceInclTax()  : float|null
getProduct()  : Mage_Catalog_Model_Product
Retrieve product model object associated with item.
getProductId()  : int|null
getProductOrderOptions()  : array<string|int, mixed>|null
getProductType()  : string|null
Get item product type
getQty()  : float|null
getQtyOptions()  : array<string|int, mixed>
Retrieve option product with Qty
getQtyToAdd()  : float|null
getQuote()  : Mage_Sales_Model_Quote
Retrieve quote model object
getQuoteId()  : int|null
getRealProductType()  : string
Return real product type of item
getRedirectUrl()  : string|null
getResource()  : Mage_Sales_Model_Resource_Quote_Item
Retrieve model resource
getResourceCollection()  : Mage_Core_Model_Resource_Db_Collection_Abstract
Get collection instance
getResourceName()  : string
Retrieve model resource name
getRowTax()  : float|null
getRowTotal()  : float|null
getRowTotalInclTax()  : float|null
getRowTotalWithDiscount()  : float|null
getRowWeight()  : float|null
getShippingAddress()  : Mage_Customer_Model_Address_Abstract|null
getSku()  : string|null
getStore()  : Mage_Core_Model_Store
Retrieve store model object
getStoreId()  : int|null
getTaxableAmount()  : float|null
getTaxAmount()  : float|null
getTaxBeforeDiscount()  : float|null
getTaxClassId()  : int|null
getTaxPercent()  : float|null
getTotalQty()  : int|float
Get total item quantity (include parent item relation)
getUpdatedAt()  : string|null
getUseOldQty()  : bool|null
getWeeeDiscount()  : float|null
getWeeeTaxApplied()  : string|null
getWeeeTaxAppliedAmount()  : float|null
getWeeeTaxAppliedRowAmount()  : float|null
getWeeeTaxDisposition()  : float|null
getWeeeTaxRowDisposition()  : float|null
getWeight()  : float|null
hasBaseCalculationPrice()  : bool
hasCustomPrice()  : bool
hasData()  : bool
If $key is empty, checks whether there's any data in the object Otherwise checks if the specified attribute is set.
hasDataChanges()  : bool
Get data change status
hasErrors()  : bool
hasOriginalCustomPrice()  : bool
isChildrenCalculated()  : bool
Checking if there children calculated or parent item when we have parent quote item and its children
isCustomItem()  : bool
Check if the item is a custom line: it has a name and no catalog product.
isDeleted()  : bool
Set _isDeleted flag value (if $isDeleted param is defined) and return current flag value
isDirty()  : bool
isEmpty()  : bool
checks whether the object is empty
isModuleEnabled()  : bool
isObjectNew()  : bool
Check object state (true - if it is object without id on object just created) This method can help detect if object just created in _afterSave method problem is what in after save object has id and we can't detect what object was created in this transaction
isShipSeparately()  : bool
Checking can we ship product separately (each child separately) or each parent product item can be shipped only like one item
jsonSerialize()  : array<string|int, mixed>
Implementation of JsonSerializable::jsonSerialize()
load()  : $this
Load object data
offsetExists()  : bool
Implementation of ArrayAccess::offsetExists()
offsetGet()  : mixed
Implementation of ArrayAccess::offsetGet()
offsetSet()  : void
Implementation of ArrayAccess::offsetSet()
offsetUnset()  : void
Implementation of ArrayAccess::offsetUnset()
removeErrorInfosByParams()  : $this
Removes error infos, that have parameters equal to passed in $params.
removeMessageByText()  : $this
Removes message by text
removeOption()  : $this
Remove option from item options
representProduct()  : bool
Check product representation in item
save()  : $this
Save model plus its options Ensures saving options in case when resource model was not changed
serialize()  : string
serialize object attributes
setAdditionalData()  : static
setAddress()  : static
setAppliedRuleIds()  : static
setAttribute()  : $this
setBackorders()  : static
setBaseCalculationPrice()  : static
setBaseCost()  : static
setBaseCustomPrice()  : static
setBaseDiscountAmount()  : static
setBaseDiscountCalculationPrice()  : static
setBaseExtraRowTaxableAmount()  : static
setBaseExtraTaxableAmount()  : static
setBaseHiddenTaxAmount()  : static
setBaseOriginalDiscountAmount()  : static
setBaseOriginalPrice()  : static
setBasePrice()  : static
setBasePriceInclTax()  : static
setBaseRowTax()  : static
setBaseRowTotal()  : static
setBaseRowTotalInclTax()  : static
setBaseRowTotalWithDiscount()  : static
setBaseShippingAmount()  : static
setBaseTaxableAmount()  : static
setBaseTaxAmount()  : static
setBaseTaxBeforeDiscount()  : static
setBaseTaxCalcPrice()  : static
setBaseTaxCalcRowTotal()  : static
setBaseWeeeTaxAppliedAmount()  : static
setBaseWeeeTaxAppliedRowAmount()  : static
setBaseWeeeTaxDisposition()  : static
setBaseWeeeTaxRowDisposition()  : static
setCalculationPrice()  : static
setConvertedPrice()  : $this
Set new value for converted price
setCreatedAt()  : static
setCustomPrice()  : $this
Specify custom item price (used in case when we have applied not product price to item)
setData()  : $this
Overwrite data in the object.
setDataChanges()  : $this
Clears data changes status
setDataUsingMethod()  : $this
Set object data with calling setter method
setDescription()  : static
setDiscountAmount()  : static
setDiscountCalculationPrice()  : static
setDiscountPercent()  : static
setDiscountTaxCompensation()  : static
setExtraRowTaxableAmount()  : static
setExtraTaxableAmount()  : static
setFreeShipping()  : static
setGiftMessage()  : static
setGiftMessageId()  : static
setHasChildren()  : static
setHasConfigurationUnavailableError()  : static
setHasError()  : static
Sets flag, whether this quote item has some error associated with it.
setHiddenTaxAmount()  : static
setId()  : $this
Declare model object identifier value
setIdFieldName()  : $this
set name of object id field
setIsPriceInclTax()  : static
setIsQtyDecimal()  : static
setIsVirtual()  : static
setMessage()  : $this
Adds message(s) for quote item. Duplicated messages are not added.
setName()  : static
setNoDiscount()  : static
setOptions()  : $this
Initialize quote item options
setOrigData()  : $this
Initialize object original data
setOriginalCustomPrice()  : static
setOriginalDiscountAmount()  : static
setOriginalPrice()  : $this
Set original price to item (calculation price will be refreshed too)
setParentItem()  : $this
Set parent item
setParentItemId()  : static
setParentProductId()  : static
setPrice()  : $this
Specify item price (base calculation price and converted price will be refreshed too)
setPriceInclTax()  : static
setProduct()  : static
Setup product for quote item
setProductId()  : static
setProductOrderOptions()  : static
setProductType()  : static
setQty()  : static
Declare quote item quantity
setQtyOptions()  : $this
Set option product with Qty
setQtyToAdd()  : static
setQuote()  : $this
Declare quote model object
setQuoteId()  : static
setQuoteItemId()  : static
setQuoteMessage()  : static
setQuoteMessageIndex()  : static
setRedirectUrl()  : static
setRowTax()  : static
setRowTotal()  : static
setRowTotalExcTax()  : static
setRowTotalInclTax()  : static
setRowTotalWithDiscount()  : static
setRowWeight()  : static
setSku()  : static
setStoreId()  : static
setTaxableAmount()  : static
setTaxAmount()  : static
setTaxBeforeDiscount()  : static
setTaxCalcPrice()  : static
setTaxCalcRowTotal()  : static
setTaxClassId()  : static
setTaxPercent()  : static
setTaxRates()  : static
setUpdatedAt()  : static
setWeeeTaxApplied()  : static
setWeeeTaxAppliedAmount()  : static
setWeeeTaxAppliedRowAmount()  : static
setWeeeTaxDisposition()  : static
setWeeeTaxRowDisposition()  : static
setWeight()  : static
toArray()  : array<string|int, mixed>
Convert Quote Item to array
toJson()  : string
Public wrapper for __toJson
toString()  : string
Public wrapper for __toString
toXml()  : string
Public wrapper for __toXml
unsBasePriceInclTax()  : $this
unsBaseRowTotalInclTax()  : $this
unsetData()  : $this
Unset data from the object.
unsetOldData()  : $this
Unset old fields data from the object.
unsHasConfigurationUnavailableError()  : $this
unsMessage()  : $this
unsPriceInclTax()  : $this
unsRowTotalInclTax()  : $this
updateQtyOption()  : $this
Can specify specific actions for ability to change given quote options values Example: cataloginventory decimal qty validation may change qty to int, so need to change quote item qty option value.
__toJson()  : string
Convert object attributes to JSON
__toXml()  : string
Convert object attributes to XML
_addFullNames()  : mixed
_addOptionCode()  : $this
Register option code
_afterDelete()  : $this
Processing object after delete data
_afterDeleteCommit()  : $this
Processing manipulation after main transaction commit
_afterLoad()  : $this
Processing object after load data
_afterSave()  : $this
Save item options after item saved
_beforeDelete()  : $this
Processing object before delete data
_beforeLoad()  : $this
Processing object before load data
_beforeSave()  : $this
Quote Item Before Save prepare data process
_camelize()  : string
_clearData()  : $this
Clearing object's data
_clearErrorInfo()  : $this
Clears list of errors, associated with this quote item.
_clearReferences()  : $this
Clearing cyclic references
_construct()  : void
Internal constructor not depended on params. Can be used for object initialization
_createCustomItemProduct()  : Mage_Catalog_Model_Product
Make an unsaved product from the columns of a custom line.
_getApp()  : Mage_Core_Model_App
Get Maho App instance
_getData()  : mixed
Get value from _data array without parse key
_getEventData()  : array<string|int, mixed>
Get array of objects transferred to default events processing
_hasModelChanged()  : bool
Checks that item model has data changes.
_init()  : mixed
Standard model initialization
_initOldFieldsMap()  : $this
Init mapping array of short fields to its full names
_prepareArray()  : array<string|int, mixed>
Set required array elements
_prepareQty()  : int|float
Prepare quantity
_prepareSyncFieldsMap()  : $this
Called after old fields are inited. Forms synchronization map to sync old fields and new fields between each other.
_protectFromNonAdmin()  : mixed
Safeguard func that will check, if we are in admin area
_saveItemOptions()  : $this
Save item options
_setHasError()  : $this
Sets flag, whether this quote item has some error associated with it.
_setResourceModel()  : mixed
Set resource names
_underscore()  : string
Converts field names for setters and getters

Properties

$_cacheTag

Model cache tag for clear cache in after save and after delete

protected string|bool|array<string|int, mixed> $_cacheTag = \false

When you use true - all cache will be clean

$_children

Children items in bundle product, configurable product, etc.

protected array<string|int, mixed> $_children = []

$_data

Object attributes

protected array<string|int, mixed>|null $_data = []

$_dataSaveAllowed

Flag which can stop data saving after before save Can be used for next sequence: we check data in _beforeSave, if data are not valid - we can set this flag to false value and save process will be stopped

protected bool $_dataSaveAllowed = \true

$_dirty

protected array<string|int, mixed> $_dirty

$_eventObject

Parameter name in event

protected string $_eventObject = 'item'

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

Attributes
#[Override]

$_eventPrefix

Prefix of model events names

protected string $_eventPrefix = 'sales_quote_item'
Attributes
#[Override]

$_flagOptionsSaved

Flag stating that options were successfully saved

protected mixed $_flagOptionsSaved = \null

$_hasDataChanges

Data changes flag (true after setData|unsetData call)

protected bool $_hasDataChanges = false

$_idFieldName

Name of object id field

protected string $_idFieldName = null

$_isDeleted

Object delete flag

protected bool $_isDeleted = false

$_isObjectNew

Flag which allow detect object state: is it new object (without id) or existing one (with id)

protected bool|null $_isObjectNew = \null

$_messages

protected array<string|int, mixed> $_messages = []

$_notRepresentOptions

Not Represent options

protected array<string|int, mixed> $_notRepresentOptions = ['info_buyRequest']

$_oldFieldsMap

Map short fields names to its full names

protected array<string|int, mixed> $_oldFieldsMap = []

$_options

Item options array

protected array<string|int, mixed> $_options = []

$_optionsByCode

Item options by code cache

protected array<string|int, mixed> $_optionsByCode = []
Attributes
#[Override]

$_origData

Original data that was loaded

protected array<string|int, mixed>|null $_origData

$_resourceCollectionName

Name of the resource collection model

protected string $_resourceCollectionName

$_resourceName

Name of the resource model

protected string $_resourceName

$_syncFieldsMap

Map of fields to sync to other fields upon changing their data

protected mixed $_syncFieldsMap = []

$_underscoreCache

Setter/Getter underscore transformation cache

protected static array<string|int, mixed> $_underscoreCache = []

Methods

__call()

Set/Get attribute wrapper

public __call(string $method, array<string|int, mixed> $args) : mixed
Parameters
$method : string
$args : array<string|int, mixed>

__clone()

Clone quote item

public __clone() : mixed
Attributes
#[Override]

__construct()

Constructor

public __construct() : mixed

By default, is looking for first argument as array and assigns it as object attributes This behaviour may change in child classes

__get()

Attribute getter (deprecated)

public __get(string $var) : mixed
Parameters
$var : string

__set()

Attribute setter (deprecated)

public __set(string $var, mixed $value) : mixed
Parameters
$var : string
$value : mixed

__toArray()

Convert object attributes to array

public __toArray([array<string|int, mixed> $arrAttributes = [] ]) : array<string|int, mixed>
Parameters
$arrAttributes : array<string|int, mixed> = []

array of required attributes

Return values
array<string|int, mixed>

addData()

Add data to the object.

public addData(array<string|int, mixed> $arr) : $this

Retains previous data in the object.

Parameters
$arr : array<string|int, mixed>
Return values
$this

addErrorInfo()

Adds error information to the quote item.

public addErrorInfo([string|null $origin = null ][, int|null $code = null ][, string|null $message = null ][, DataObject|null $additionalData = null ]) : $this

Automatically sets error flag.

Parameters
$origin : string|null = null

Usually a name of module, that embeds error

$code : int|null = null

Error code, unique for origin, that sets it

$message : string|null = null

Error message

$additionalData : DataObject|null = null

Any additional data, that caller would like to store

Return values
$this

addMessage()

Add message of quote item to array of messages

public addMessage(string $message) : $this
Parameters
$message : string
Return values
$this

addQty()

Adding quantity to quote item

public addQty(float $qty) : $this
Parameters
$qty : float
Return values
$this

afterCommitCallback()

Callback function which called after transaction commit in resource model

public afterCommitCallback() : $this
Return values
$this

afterLoad()

Object after load processing. Implemented as public interface for supporting objects after load in collections

public afterLoad() : $this
Return values
$this

calcRowTotal()

Calculate item row total price

public calcRowTotal() : $this
Return values
$this

calcTaxAmount()

Calculate item tax amount

public calcTaxAmount() : $this

logic moved to tax totals calculation model

Return values
$this

checkData()

Checking item data

public checkData() : $this
Return values
$this

cleanModelCache()

Remove model object related cache

public cleanModelCache() : $this
Return values
$this

clearInstance()

Clearing object for correct deleting by garbage collector

public final clearInstance() : $this
Return values
$this

clearMessage()

Clears all messages

public clearMessage() : $this
Return values
$this

compareOptions()

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

public compareOptions(array<string|int, mixed> $options1, array<string|int, mixed> $options2) : bool
Parameters
$options1 : array<string|int, mixed>
$options2 : array<string|int, mixed>
Return values
bool

dataHasChangedFor()

Compare object data with original data

public dataHasChangedFor(string $field) : bool
Parameters
$field : string
Return values
bool

debug()

Present object data as string in debug mode

public debug([mixed $data = null ][, array<string|int, mixed> &$objects = [] ]) : string|array<string|int, mixed>
Parameters
$data : mixed = null
$objects : array<string|int, mixed> = []
Return values
string|array<string|int, mixed>

delete()

Delete object from database

public delete() : $this
Tags
throws
Throwable
Return values
$this

flagDirty()

public flagDirty(string $field[, bool $flag = true ]) : $this
Parameters
$field : string
$flag : bool = true
Return values
$this

getAdditionalData()

public getAdditionalData() : string|null
Return values
string|null

getAppliedRuleIds()

public getAppliedRuleIds() : string|null
Return values
string|null

getBaseCalculationPrice()

Get calculation price used for quote calculation in base currency.

public getBaseCalculationPrice() : float
Return values
float

getBaseCalculationPriceOriginal()

Get original calculation price used for quote calculation in base currency.

public getBaseCalculationPriceOriginal() : float
Return values
float

getBaseCost()

public getBaseCost() : float|null
Return values
float|null

getBaseDiscountAmount()

public getBaseDiscountAmount() : float|null
Return values
float|null

getBaseDiscountCalculationPrice()

public getBaseDiscountCalculationPrice() : float|null
Return values
float|null

getBaseHiddenTaxAmount()

public getBaseHiddenTaxAmount() : float|null
Return values
float|null

getBaseOriginalDiscountAmount()

public getBaseOriginalDiscountAmount() : float|null
Return values
float|null

getBaseOriginalPrice()

public getBaseOriginalPrice() : float|null
Return values
float|null

getBasePrice()

public getBasePrice() : float|null
Return values
float|null

getBasePriceInclTax()

public getBasePriceInclTax() : float|null
Return values
float|null

getBaseRowTax()

public getBaseRowTax() : float|null
Return values
float|null

getBaseRowTotal()

public getBaseRowTotal() : float|null
Return values
float|null

getBaseRowTotalInclTax()

public getBaseRowTotalInclTax() : float|null
Return values
float|null

getBaseRowTotalWithDiscount()

public getBaseRowTotalWithDiscount() : float|null
Return values
float|null

getBaseShippingAmount()

public getBaseShippingAmount() : float|null
Return values
float|null

getBaseTaxableAmount()

public getBaseTaxableAmount() : float|null
Return values
float|null

getBaseTaxAmount()

public getBaseTaxAmount() : float|null
Return values
float|null

getBaseTaxBeforeDiscount()

public getBaseTaxBeforeDiscount() : float|null
Return values
float|null

getBaseWeeeDiscount()

public getBaseWeeeDiscount() : float|null
Return values
float|null

getBaseWeeeTaxAppliedAmount()

public getBaseWeeeTaxAppliedAmount() : float|null
Return values
float|null

getBaseWeeeTaxAppliedRowAmount()

public getBaseWeeeTaxAppliedRowAmount() : float|null
Return values
float|null

getBaseWeeeTaxDisposition()

public getBaseWeeeTaxDisposition() : float|null
Return values
float|null

getBaseWeeeTaxRowDisposition()

public getBaseWeeeTaxRowDisposition() : float|null
Return values
float|null

getBuyRequest()

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

public getBuyRequest() : DataObject
Return values
DataObject

getCacheIdTags()

Get cache tags associated with object id

public getCacheIdTags() : array<string|int, mixed>|false
Return values
array<string|int, mixed>|false

getCacheTags()

Get list of cache tags applied to model object.

public getCacheTags() : array<string|int, mixed>|false

Return false if cache tags are not supported by model

Return values
array<string|int, mixed>|false

getCalculationPrice()

Get item price used for quote calculation process.

public getCalculationPrice() : float

This method get custom price (if it is defined) or original product final price

Return values
float

getCalculationPriceOriginal()

Get item price used for quote calculation process.

public getCalculationPriceOriginal() : float

This method get original custom price applied before tax calculation

Return values
float

getConvertedPrice()

Get item price converted to quote currency

public getConvertedPrice() : float
Return values
float

getCost()

public getCost() : float|null
Return values
float|null

getCreatedAt()

public getCreatedAt() : string|null
Return values
string|null

getCustomPrice()

public getCustomPrice() : float|null
Return values
float|null

getData()

Object data getter

public getData([string $key = '' ][, string|int $index = null ]) : mixed

If $key is not defined will return all the data as an array. Otherwise, it will return value of the element specified by $key. It is possible to use keys like a/b/c for access nested array data

If $index is specified it will assume that attribute data is an array and retrieve corresponding member. If data is the string - it will be explode by new line character and converted to array.

Parameters
$key : string = ''
$index : string|int = null

getDataByKey()

Get object data by particular key

public getDataByKey(string $key) : mixed
Parameters
$key : string

getDataByPath()

Get object data by path

public getDataByPath(string $path) : mixed

Method consider the path as chain of keys: a/b/c => ['a']['b']['c']

Parameters
$path : string

getDataSetDefault()

Fast get data or set default if value is not available

public getDataSetDefault(string $key, mixed $default) : mixed
Parameters
$key : string
$default : mixed

getDataUsingMethod()

Get object data by key with calling getter method

public getDataUsingMethod(string $key[, mixed $args = null ]) : mixed
Parameters
$key : string
$args : mixed = null

getDescription()

public getDescription() : string|null
Return values
string|null

getDiscountAmount()

Get discount amount with proper float casting DBAL returns DECIMAL as string, so we cast to float

public getDiscountAmount() : float|null
Attributes
#[Override]
Return values
float|null

getDiscountCalculationPrice()

public getDiscountCalculationPrice() : float|null
Return values
float|null

getDiscountPercent()

public getDiscountPercent() : float|null
Return values
float|null

getDiscountTaxCompensation()

public getDiscountTaxCompensation() : float|null
Return values
float|null

getEntityId()

public getEntityId() : int
Return values
int

getErrorInfos()

Retrieves all error infos, associated with this item

public getErrorInfos() : array<string|int, mixed>
Return values
array<string|int, mixed>

getFileDownloadParams()

Returns special download params (if needed) for custom option with type = 'file' Needed to implement Mage_Catalog_Model_Product_Configuration_Item_Interface.

public getFileDownloadParams() : null|DataObject

Return null, as quote item needs no additional configuration.

Attributes
#[Override]
Return values
null|DataObject

getFreeShipping()

public getFreeShipping() : bool|float
Return values
bool|float

getGiftMessageId()

public getGiftMessageId() : int|null
Return values
int|null

getHasChildren()

public getHasChildren() : bool|null
Return values
bool|null

getHasConfigurationUnavailableError()

public getHasConfigurationUnavailableError() : bool|null
Return values
bool|null

getHasError()

public getHasError() : bool|null
Return values
bool|null

getHiddenTaxAmount()

public getHiddenTaxAmount() : float|null
Return values
float|null

getId()

Retrieve model object identifier

public getId() : int|string|null
Attributes
#[Override]
Return values
int|string|null

getIdFieldName()

Retrieve identifier field name for model

public getIdFieldName() : string
Attributes
#[Override]
Return values
string

getIsPriceInclTax()

public getIsPriceInclTax() : bool|null
Return values
bool|null

getIsQtyDecimal()

public getIsQtyDecimal() : bool|null
Return values
bool|null

getIsVirtual()

public getIsVirtual() : bool|null
Return values
bool|null

getItemId()

public getItemId() : int|null
Return values
int|null

getMessage()

Get messages array of quote item

public getMessage([bool $string = true ]) : array<string|int, mixed>|string
Parameters
$string : bool = true

flag for converting messages to string

Return values
array<string|int, mixed>|string

getName()

public getName() : string|null
Return values
string|null

getNoDiscount()

public getNoDiscount() : bool|null
Return values
bool|null

getOptions()

Get all item options

public getOptions() : array<string|int, mixed>
Return values
array<string|int, mixed>

getOptionsByCode()

Get all item options as array with codes in array key

public getOptionsByCode() : array<string|int, mixed>
Return values
array<string|int, mixed>

getOrigData()

Get object loaded data (original data)

public getOrigData([string $key = null ]) : mixed
Parameters
$key : string = null

getOriginalCustomPrice()

public getOriginalCustomPrice() : float|null
Return values
float|null

getOriginalDiscountAmount()

public getOriginalDiscountAmount() : float|null
Return values
float|null

getOriginalPrice()

Get original price (retrieved from product) for item.

public getOriginalPrice() : float

Original price value is in quote selected currency

Return values
float

getParentItemId()

public getParentItemId() : int|null
Return values
int|null

getPrice()

public getPrice() : float|null
Return values
float|null

getPriceInclTax()

public getPriceInclTax() : float|null
Return values
float|null

getProductId()

public getProductId() : int|null
Return values
int|null

getProductOrderOptions()

public getProductOrderOptions() : array<string|int, mixed>|null
Return values
array<string|int, mixed>|null

getProductType()

Get item product type

public getProductType() : string|null
Attributes
#[Override]
Return values
string|null

getQty()

public getQty() : float|null
Return values
float|null

getQtyOptions()

Retrieve option product with Qty

public getQtyOptions() : array<string|int, mixed>

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

Return values
array<string|int, mixed>

getQtyToAdd()

public getQtyToAdd() : float|null
Return values
float|null

getQuoteId()

public getQuoteId() : int|null
Return values
int|null

getRealProductType()

Return real product type of item

public getRealProductType() : string
Return values
string

getRedirectUrl()

public getRedirectUrl() : string|null
Return values
string|null

getResourceName()

Retrieve model resource name

public getResourceName() : string
Return values
string

getRowTax()

public getRowTax() : float|null
Return values
float|null

getRowTotal()

public getRowTotal() : float|null
Return values
float|null

getRowTotalInclTax()

public getRowTotalInclTax() : float|null
Return values
float|null

getRowTotalWithDiscount()

public getRowTotalWithDiscount() : float|null
Return values
float|null

getRowWeight()

public getRowWeight() : float|null
Return values
float|null

getSku()

public getSku() : string|null
Return values
string|null

getStoreId()

public getStoreId() : int|null
Return values
int|null

getTaxableAmount()

public getTaxableAmount() : float|null
Return values
float|null

getTaxAmount()

public getTaxAmount() : float|null
Return values
float|null

getTaxBeforeDiscount()

public getTaxBeforeDiscount() : float|null
Return values
float|null

getTaxClassId()

public getTaxClassId() : int|null
Return values
int|null

getTaxPercent()

public getTaxPercent() : float|null
Return values
float|null

getTotalQty()

Get total item quantity (include parent item relation)

public getTotalQty() : int|float
Return values
int|float

getUpdatedAt()

public getUpdatedAt() : string|null
Return values
string|null

getUseOldQty()

public getUseOldQty() : bool|null
Return values
bool|null

getWeeeDiscount()

public getWeeeDiscount() : float|null
Return values
float|null

getWeeeTaxApplied()

public getWeeeTaxApplied() : string|null
Return values
string|null

getWeeeTaxAppliedAmount()

public getWeeeTaxAppliedAmount() : float|null
Return values
float|null

getWeeeTaxAppliedRowAmount()

public getWeeeTaxAppliedRowAmount() : float|null
Return values
float|null

getWeeeTaxDisposition()

public getWeeeTaxDisposition() : float|null
Return values
float|null

getWeeeTaxRowDisposition()

public getWeeeTaxRowDisposition() : float|null
Return values
float|null

getWeight()

public getWeight() : float|null
Return values
float|null

hasBaseCalculationPrice()

public hasBaseCalculationPrice() : bool
Return values
bool

hasCustomPrice()

public hasCustomPrice() : bool
Return values
bool

hasData()

If $key is empty, checks whether there's any data in the object Otherwise checks if the specified attribute is set.

public hasData([string $key = '' ]) : bool
Parameters
$key : string = ''
Return values
bool

hasDataChanges()

Get data change status

public hasDataChanges() : bool
Return values
bool

hasErrors()

public hasErrors() : bool
Return values
bool

hasOriginalCustomPrice()

public hasOriginalCustomPrice() : bool
Return values
bool

isChildrenCalculated()

Checking if there children calculated or parent item when we have parent quote item and its children

public isChildrenCalculated() : bool
Return values
bool

isCustomItem()

Check if the item is a custom line: it has a name and no catalog product.

public isCustomItem() : bool
Return values
bool

isDeleted()

Set _isDeleted flag value (if $isDeleted param is defined) and return current flag value

public isDeleted([bool $isDeleted = null ]) : bool
Parameters
$isDeleted : bool = null
Return values
bool

isDirty()

public isDirty([string $field = null ]) : bool
Parameters
$field : string = null
Return values
bool

isEmpty()

checks whether the object is empty

public isEmpty() : bool
Return values
bool

isModuleEnabled()

public isModuleEnabled(string $moduleName[, string $helperAlias = 'core' ]) : bool
Parameters
$moduleName : string
$helperAlias : string = 'core'
Return values
bool

isObjectNew()

Check object state (true - if it is object without id on object just created) This method can help detect if object just created in _afterSave method problem is what in after save object has id and we can't detect what object was created in this transaction

public isObjectNew([bool $flag = null ]) : bool
Parameters
$flag : bool = null
Return values
bool

isShipSeparately()

Checking can we ship product separately (each child separately) or each parent product item can be shipped only like one item

public isShipSeparately() : bool
Return values
bool

jsonSerialize()

Implementation of JsonSerializable::jsonSerialize()

public jsonSerialize() : array<string|int, mixed>

Prepares the object data for JSON serialization. Returns all object data as an array, with special handling for nested DataObject instances:

  • If a nested DataObject has a custom jsonSerialize() implementation, it's preserved as-is
  • If a nested DataObject has a custom toJson() method, it's converted to JSON string
  • If a nested DataObject uses only the base implementations, it's excluded from output

This prevents infinite recursion and circular references when serializing object hierarchies.

Attributes
#[Override]
Return values
array<string|int, mixed>

load()

Load object data

public load(string|null|int $id[, string|null $field = null ]) : $this
Parameters
$id : string|null|int
$field : string|null = null
Return values
$this

removeErrorInfosByParams()

Removes error infos, that have parameters equal to passed in $params.

public removeErrorInfosByParams(array<string|int, mixed> $params) : $this

$params can have following keys (if not set - then any item is good for this key): 'origin', 'code', 'message'

Parameters
$params : array<string|int, mixed>
Return values
$this

removeMessageByText()

Removes message by text

public removeMessageByText(string $text) : $this
Parameters
$text : string
Return values
$this

removeOption()

Remove option from item options

public removeOption(string $code) : $this
Parameters
$code : string
Return values
$this

save()

Save model plus its options Ensures saving options in case when resource model was not changed

public save() : $this
Attributes
#[Override]
Return values
$this

serialize()

serialize object attributes

public serialize([array<string|int, mixed> $attributes = [] ][, string $valueSeparator = '=' ][, string $fieldSeparator = ' ' ][, string $quote = '"' ]) : string
Parameters
$attributes : array<string|int, mixed> = []
$valueSeparator : string = '='
$fieldSeparator : string = ' '
$quote : string = '"'
Return values
string

setAdditionalData()

public setAdditionalData(string|null $value) : static
Parameters
$value : string|null
Return values
static

setAppliedRuleIds()

public setAppliedRuleIds(string|null $value) : static
Parameters
$value : string|null
Return values
static

setBackorders()

public setBackorders(int|null $value) : static
Parameters
$value : int|null
Return values
static

setBaseCalculationPrice()

public setBaseCalculationPrice(float|null $value) : static
Parameters
$value : float|null
Return values
static

setBaseCost()

public setBaseCost(float|null $value) : static
Parameters
$value : float|null
Return values
static

setBaseCustomPrice()

public setBaseCustomPrice(float|null $value) : static
Parameters
$value : float|null
Return values
static

setBaseDiscountAmount()

public setBaseDiscountAmount(float|null $value) : static
Parameters
$value : float|null
Return values
static

setBaseDiscountCalculationPrice()

public setBaseDiscountCalculationPrice(float|null $value) : static
Parameters
$value : float|null
Return values
static

setBaseExtraRowTaxableAmount()

public setBaseExtraRowTaxableAmount(float|null $value) : static
Parameters
$value : float|null
Return values
static

setBaseExtraTaxableAmount()

public setBaseExtraTaxableAmount(float|null $value) : static
Parameters
$value : float|null
Return values
static

setBaseHiddenTaxAmount()

public setBaseHiddenTaxAmount(float|null $value) : static
Parameters
$value : float|null
Return values
static

setBaseOriginalDiscountAmount()

public setBaseOriginalDiscountAmount(float|null $value) : static
Parameters
$value : float|null
Return values
static

setBaseOriginalPrice()

public setBaseOriginalPrice(float|null $value) : static
Parameters
$value : float|null
Return values
static

setBasePrice()

public setBasePrice(float|null $value) : static
Parameters
$value : float|null
Return values
static

setBasePriceInclTax()

public setBasePriceInclTax(float|null $value) : static
Parameters
$value : float|null
Return values
static

setBaseRowTax()

public setBaseRowTax(float|null $value) : static
Parameters
$value : float|null
Return values
static

setBaseRowTotal()

public setBaseRowTotal(float|null $value) : static
Parameters
$value : float|null
Return values
static

setBaseRowTotalInclTax()

public setBaseRowTotalInclTax(float|null $value) : static
Parameters
$value : float|null
Return values
static

setBaseRowTotalWithDiscount()

public setBaseRowTotalWithDiscount(float|null $value) : static
Parameters
$value : float|null
Return values
static

setBaseShippingAmount()

public setBaseShippingAmount(float|null $value) : static
Parameters
$value : float|null
Return values
static

setBaseTaxableAmount()

public setBaseTaxableAmount(float|null $value) : static
Parameters
$value : float|null
Return values
static

setBaseTaxAmount()

public setBaseTaxAmount(float|null $value) : static
Parameters
$value : float|null
Return values
static

setBaseTaxBeforeDiscount()

public setBaseTaxBeforeDiscount(float|null $value) : static
Parameters
$value : float|null
Return values
static

setBaseTaxCalcPrice()

public setBaseTaxCalcPrice(float|null $value) : static
Parameters
$value : float|null
Return values
static

setBaseTaxCalcRowTotal()

public setBaseTaxCalcRowTotal(float|null $value) : static
Parameters
$value : float|null
Return values
static

setBaseWeeeTaxAppliedAmount()

public setBaseWeeeTaxAppliedAmount(float|null $value) : static
Parameters
$value : float|null
Return values
static

setBaseWeeeTaxAppliedRowAmount()

public setBaseWeeeTaxAppliedRowAmount(float|null $value) : static
Parameters
$value : float|null
Return values
static

setBaseWeeeTaxDisposition()

public setBaseWeeeTaxDisposition(float|null $value) : static
Parameters
$value : float|null
Return values
static

setBaseWeeeTaxRowDisposition()

public setBaseWeeeTaxRowDisposition(float|null $value) : static
Parameters
$value : float|null
Return values
static

setCalculationPrice()

public setCalculationPrice(float|null $value) : static
Parameters
$value : float|null
Return values
static

setConvertedPrice()

Set new value for converted price

public setConvertedPrice(float|null $value) : $this
Parameters
$value : float|null
Return values
$this

setCreatedAt()

public setCreatedAt(string|null $value) : static
Parameters
$value : string|null
Return values
static

setCustomPrice()

Specify custom item price (used in case when we have applied not product price to item)

public setCustomPrice(float $value) : $this
Parameters
$value : float
Return values
$this

setData()

Overwrite data in the object.

public setData(string|array<string|int, mixed> $key[, mixed $value = null ]) : $this

$key can be string or array. If $key is string, the attribute value will be overwritten by $value

If $key is an array, it will overwrite all the data in the object.

Parameters
$key : string|array<string|int, mixed>
$value : mixed = null
Return values
$this

setDataChanges()

Clears data changes status

public setDataChanges(bool $value) : $this
Parameters
$value : bool
Return values
$this

setDataUsingMethod()

Set object data with calling setter method

public setDataUsingMethod(string $key[, mixed $args = [] ]) : $this
Parameters
$key : string
$args : mixed = []
Return values
$this

setDescription()

public setDescription(string|null $value) : static
Parameters
$value : string|null
Return values
static

setDiscountAmount()

public setDiscountAmount(float|null $value) : static
Parameters
$value : float|null
Return values
static

setDiscountCalculationPrice()

public setDiscountCalculationPrice(float|null $value) : static
Parameters
$value : float|null
Return values
static

setDiscountPercent()

public setDiscountPercent(float|null $value) : static
Parameters
$value : float|null
Return values
static

setDiscountTaxCompensation()

public setDiscountTaxCompensation(float|null $value) : static
Parameters
$value : float|null
Return values
static

setExtraRowTaxableAmount()

public setExtraRowTaxableAmount(float|null $value) : static
Parameters
$value : float|null
Return values
static

setExtraTaxableAmount()

public setExtraTaxableAmount(float|null $value) : static
Parameters
$value : float|null
Return values
static

setFreeShipping()

public setFreeShipping(bool|float $value) : static
Parameters
$value : bool|float
Return values
static

setGiftMessage()

public setGiftMessage(string|null $value) : static
Parameters
$value : string|null
Return values
static

setGiftMessageId()

public setGiftMessageId(int|null $value) : static
Parameters
$value : int|null
Return values
static

setHasChildren()

public setHasChildren([bool|null $value = true ]) : static
Parameters
$value : bool|null = true
Return values
static

setHasConfigurationUnavailableError()

public setHasConfigurationUnavailableError([bool|null $value = true ]) : static
Parameters
$value : bool|null = true
Return values
static

setHasError()

Sets flag, whether this quote item has some error associated with it.

public setHasError([bool|null $flag = true ]) : static

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.

Parameters
$flag : bool|null = true
Tags
see
addErrorInfo()
Attributes
#[Override]
Return values
static

setHiddenTaxAmount()

public setHiddenTaxAmount(float|null $value) : static
Parameters
$value : float|null
Return values
static

setId()

Declare model object identifier value

public setId(mixed $id) : $this
Parameters
$id : mixed
Attributes
#[Override]
Return values
$this

setIdFieldName()

set name of object id field

public setIdFieldName(string $name) : $this
Parameters
$name : string
Return values
$this

setIsPriceInclTax()

public setIsPriceInclTax([bool|null $value = true ]) : static
Parameters
$value : bool|null = true
Return values
static

setIsQtyDecimal()

public setIsQtyDecimal([bool|null $value = true ]) : static
Parameters
$value : bool|null = true
Return values
static

setIsVirtual()

public setIsVirtual([bool|null $value = true ]) : static
Parameters
$value : bool|null = true
Return values
static

setMessage()

Adds message(s) for quote item. Duplicated messages are not added.

public setMessage(array<string|int, mixed>|string $messages) : $this
Parameters
$messages : array<string|int, mixed>|string
Return values
$this

setName()

public setName(string|null $value) : static
Parameters
$value : string|null
Return values
static

setNoDiscount()

public setNoDiscount([bool|null $value = true ]) : static
Parameters
$value : bool|null = true
Return values
static

setOptions()

Initialize quote item options

public setOptions(array<string|int, mixed> $options) : $this
Parameters
$options : array<string|int, mixed>
Return values
$this

setOrigData()

Initialize object original data

public setOrigData([string $key = null ][, mixed $data = null ]) : $this
Parameters
$key : string = null
$data : mixed = null
Return values
$this

setOriginalCustomPrice()

public setOriginalCustomPrice(float|null $value) : static
Parameters
$value : float|null
Return values
static

setOriginalDiscountAmount()

public setOriginalDiscountAmount(float|null $value) : static
Parameters
$value : float|null
Return values
static

setOriginalPrice()

Set original price to item (calculation price will be refreshed too)

public setOriginalPrice(float $price) : $this
Parameters
$price : float
Return values
$this

setParentItemId()

public setParentItemId(int|null $value) : static
Parameters
$value : int|null
Return values
static

setParentProductId()

public setParentProductId(int|null $value) : static
Parameters
$value : int|null
Return values
static

setPrice()

Specify item price (base calculation price and converted price will be refreshed too)

public setPrice(float $value) : $this
Parameters
$value : float
Return values
$this

setPriceInclTax()

public setPriceInclTax(float|null $value) : static
Parameters
$value : float|null
Return values
static

setProductId()

public setProductId(int|null $value) : static
Parameters
$value : int|null
Return values
static

setProductOrderOptions()

public setProductOrderOptions(array<string|int, mixed>|null $value) : static
Parameters
$value : array<string|int, mixed>|null
Return values
static

setProductType()

public setProductType(string|null $value) : static
Parameters
$value : string|null
Return values
static

setQty()

Declare quote item quantity

public setQty(float $qty) : static
Parameters
$qty : float
Attributes
#[Override]
Return values
static

setQtyOptions()

Set option product with Qty

public setQtyOptions(array<string|int, mixed> $qtyOptions) : $this
Parameters
$qtyOptions : array<string|int, mixed>
Return values
$this

setQtyToAdd()

public setQtyToAdd(float|null $value) : static
Parameters
$value : float|null
Return values
static

setQuoteId()

public setQuoteId(int|null $value) : static
Parameters
$value : int|null
Return values
static

setQuoteItemId()

public setQuoteItemId(int|null $value) : static
Parameters
$value : int|null
Return values
static

setQuoteMessage()

public setQuoteMessage(string|null $value) : static
Parameters
$value : string|null
Return values
static

setQuoteMessageIndex()

public setQuoteMessageIndex(string|null $value) : static
Parameters
$value : string|null
Return values
static

setRedirectUrl()

public setRedirectUrl(string|null $value) : static
Parameters
$value : string|null
Return values
static

setRowTax()

public setRowTax(float|null $value) : static
Parameters
$value : float|null
Return values
static

setRowTotal()

public setRowTotal(float|null $value) : static
Parameters
$value : float|null
Return values
static

setRowTotalExcTax()

public setRowTotalExcTax(float|null $value) : static
Parameters
$value : float|null
Return values
static

setRowTotalInclTax()

public setRowTotalInclTax(float|null $value) : static
Parameters
$value : float|null
Return values
static

setRowTotalWithDiscount()

public setRowTotalWithDiscount(float|null $value) : static
Parameters
$value : float|null
Return values
static

setRowWeight()

public setRowWeight(float|null $value) : static
Parameters
$value : float|null
Return values
static

setSku()

public setSku(string|null $value) : static
Parameters
$value : string|null
Return values
static

setStoreId()

public setStoreId(int|null $value) : static
Parameters
$value : int|null
Return values
static

setTaxableAmount()

public setTaxableAmount(float|null $value) : static
Parameters
$value : float|null
Return values
static

setTaxAmount()

public setTaxAmount(float|null $value) : static
Parameters
$value : float|null
Return values
static

setTaxBeforeDiscount()

public setTaxBeforeDiscount(float|null $value) : static
Parameters
$value : float|null
Return values
static

setTaxCalcPrice()

public setTaxCalcPrice(float|null $value) : static
Parameters
$value : float|null
Return values
static

setTaxCalcRowTotal()

public setTaxCalcRowTotal(float|null $value) : static
Parameters
$value : float|null
Return values
static

setTaxClassId()

public setTaxClassId(int|null $value) : static
Parameters
$value : int|null
Return values
static

setTaxPercent()

public setTaxPercent(float|null $value) : static
Parameters
$value : float|null
Return values
static

setTaxRates()

public setTaxRates(array<string|int, mixed>|null $value) : static
Parameters
$value : array<string|int, mixed>|null
Return values
static

setUpdatedAt()

public setUpdatedAt(string|null $value) : static
Parameters
$value : string|null
Return values
static

setWeeeTaxApplied()

public setWeeeTaxApplied(string|null $value) : static
Parameters
$value : string|null
Return values
static

setWeeeTaxAppliedAmount()

public setWeeeTaxAppliedAmount(float|null $value) : static
Parameters
$value : float|null
Return values
static

setWeeeTaxAppliedRowAmount()

public setWeeeTaxAppliedRowAmount(float|null $value) : static
Parameters
$value : float|null
Return values
static

setWeeeTaxDisposition()

public setWeeeTaxDisposition(float|null $value) : static
Parameters
$value : float|null
Return values
static

setWeeeTaxRowDisposition()

public setWeeeTaxRowDisposition(float|null $value) : static
Parameters
$value : float|null
Return values
static

setWeight()

public setWeight(float|null $value) : static
Parameters
$value : float|null
Return values
static

toArray()

Convert Quote Item to array

public toArray([array<string|int, mixed> $arrAttributes = [] ]) : array<string|int, mixed>
Parameters
$arrAttributes : array<string|int, mixed> = []
Attributes
#[Override]
Return values
array<string|int, mixed>

toJson()

Public wrapper for __toJson

public toJson([array<string|int, mixed> $arrAttributes = [] ]) : string
Parameters
$arrAttributes : array<string|int, mixed> = []
Return values
string

toString()

Public wrapper for __toString

public toString([string $format = '' ]) : string

Will use $format as an template and substitute {{key}} for attributes

Parameters
$format : string = ''
Return values
string

toXml()

Public wrapper for __toXml

public toXml([array<string|int, mixed> $arrAttributes = [] ][, string $rootName = 'item' ][, bool $addOpenTag = false ][, bool $addCdata = true ]) : string
Parameters
$arrAttributes : array<string|int, mixed> = []
$rootName : string = 'item'
$addOpenTag : bool = false
$addCdata : bool = true
Return values
string

unsBasePriceInclTax()

public unsBasePriceInclTax() : $this
Return values
$this

unsBaseRowTotalInclTax()

public unsBaseRowTotalInclTax() : $this
Return values
$this

unsetData()

Unset data from the object.

public unsetData([string $key = null ]) : $this

$key can be a string only. Array will be ignored.

Parameters
$key : string = null
Return values
$this

unsetOldData()

Unset old fields data from the object.

public unsetOldData([string $key = null ]) : $this

$key can be a string only. Array will be ignored.

Parameters
$key : string = null
Return values
$this

unsHasConfigurationUnavailableError()

public unsHasConfigurationUnavailableError() : $this
Return values
$this

unsMessage()

public unsMessage() : $this
Return values
$this

unsPriceInclTax()

public unsPriceInclTax() : $this
Return values
$this

unsRowTotalInclTax()

public unsRowTotalInclTax() : $this
Return values
$this

updateQtyOption()

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

public updateQtyOption(DataObject $option, int|float|null $value) : $this
Parameters
$option : DataObject
$value : int|float|null
Return values
$this

__toJson()

Convert object attributes to JSON

protected __toJson([array<string|int, mixed> $arrAttributes = [] ]) : string
Parameters
$arrAttributes : array<string|int, mixed> = []

array of required attributes

Return values
string

__toXml()

Convert object attributes to XML

protected __toXml([array<string|int, mixed> $arrAttributes = [] ][, string $rootName = 'item' ][, bool $addOpenTag = false ][, bool $addCdata = true ]) : string
Parameters
$arrAttributes : array<string|int, mixed> = []

array of required attributes

$rootName : string = 'item'

name of the root element

$addOpenTag : bool = false
$addCdata : bool = true
Return values
string

_addFullNames()

protected _addFullNames() : mixed

_afterDelete()

Processing object after delete data

protected _afterDelete() : $this
Return values
$this

_afterDeleteCommit()

Processing manipulation after main transaction commit

protected _afterDeleteCommit() : $this
Return values
$this

_afterLoad()

Processing object after load data

protected _afterLoad() : $this
Return values
$this

_afterSave()

Save item options after item saved

protected _afterSave() : $this
Attributes
#[Override]
Return values
$this

_beforeDelete()

Processing object before delete data

protected _beforeDelete() : $this
Return values
$this

_beforeLoad()

Processing object before load data

protected _beforeLoad(int $id[, string|null $field = null ]) : $this
Parameters
$id : int
$field : string|null = null
Return values
$this

_beforeSave()

Quote Item Before Save prepare data process

protected _beforeSave() : $this
Attributes
#[Override]
Return values
$this

_camelize()

protected _camelize(string $name) : string
Parameters
$name : string
Return values
string

_clearData()

Clearing object's data

protected _clearData() : $this
Return values
$this

_clearErrorInfo()

Clears list of errors, associated with this quote item.

protected _clearErrorInfo() : $this

Also automatically removes error-flag from oneself.

Return values
$this

_clearReferences()

Clearing cyclic references

protected _clearReferences() : $this
Return values
$this

_construct()

Internal constructor not depended on params. Can be used for object initialization

protected _construct() : void
Attributes
#[Override]

_getData()

Get value from _data array without parse key

protected _getData(string $key) : mixed
Parameters
$key : string

_getEventData()

Get array of objects transferred to default events processing

protected _getEventData() : array<string|int, mixed>
Return values
array<string|int, mixed>

_hasModelChanged()

Checks that item model has data changes.

protected _hasModelChanged() : bool

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

Attributes
#[Override]
Return values
bool

_init()

Standard model initialization

protected _init(string $resourceModel) : mixed
Parameters
$resourceModel : string

_initOldFieldsMap()

Init mapping array of short fields to its full names

protected _initOldFieldsMap() : $this
Attributes
#[Override]
Return values
$this

_prepareArray()

Set required array elements

protected _prepareArray(array<string|int, mixed> &$arr[, array<string|int, mixed> $elements = [] ]) : array<string|int, mixed>
Parameters
$arr : array<string|int, mixed>
$elements : array<string|int, mixed> = []
Return values
array<string|int, mixed>

_prepareQty()

Prepare quantity

protected _prepareQty(float|int $qty) : int|float
Parameters
$qty : float|int
Return values
int|float

_prepareSyncFieldsMap()

Called after old fields are inited. Forms synchronization map to sync old fields and new fields between each other.

protected _prepareSyncFieldsMap() : $this
Return values
$this

_protectFromNonAdmin()

Safeguard func that will check, if we are in admin area

protected _protectFromNonAdmin() : mixed
Tags
throws
Mage_Core_Exception

_saveItemOptions()

Save item options

protected _saveItemOptions() : $this
Return values
$this

_setHasError()

Sets flag, whether this quote item has some error associated with it.

protected _setHasError(bool $flag) : $this
Parameters
$flag : bool
Return values
$this

_setResourceModel()

Set resource names

protected _setResourceModel(string $resourceName[, string|null $resourceCollectionName = null ]) : mixed

If collection name is omitted, resource name will be used with _collection appended

Parameters
$resourceName : string
$resourceCollectionName : string|null = null

_underscore()

Converts field names for setters and getters

protected _underscore(string $name) : string

$this->setMyField($value) === $this->setData('my_field', $value) Uses cache to eliminate unnecessary preg_replace

Parameters
$name : string
Return values
string
On this page

Search results