Documentation

Mage_Sales_Model_Quote extends Mage_Core_Model_Abstract
in package

Quote model

Supported events: sales_quote_load_after sales_quote_save_before sales_quote_save_after sales_quote_delete_before sales_quote_delete_after

Table of Contents

Properties

$_addresses  : Mage_Sales_Model_Resource_Order_Address_Collection|null
Quote addresses collection
$_cacheTag  : string|bool|array<string|int, mixed>
Model cache tag for clear cache in after save and after delete
$_customer  : Mage_Customer_Model_Customer|null
Quote customer model object
$_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>
$_errorInfoGroups  : array<string|int, mixed>
Different groups of error infos
$_eventObject  : string
Parameter name in event
$_eventPrefix  : string
Prefix of model events names
$_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)
$_items  : Mage_Sales_Model_Resource_Quote_Item_Collection|null
Quote items collection
$_oldFieldsMap  : array<string|int, mixed>
Map short fields names to its full names
$_origData  : array<string|int, mixed>|null
Original data that was loaded
$_payments  : Mage_Sales_Model_Resource_Quote_Payment_Collection|null
Quote payments
$_preventSaving  : bool
Whether quote should not be saved
$_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
__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
Get resource instance
addAddress()  : $this
addData()  : $this
Add data to the object.
addErrorInfo()  : $this
Adds error information to the quote.
addItem()  : $this
Adding new item to quote
addMessage()  : $this
addPayment()  : $this
addProduct()  : Mage_Sales_Model_Quote_Item|string
Add product to quote
addProductAdvanced()  : Mage_Sales_Model_Quote_Item|string
Advanced func to add product to quote - processing mode can be specified there.
addShippingAddress()  : $this
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
assignCustomer()  : $this
Assign customer model object data to quote
assignCustomerWithAddressChange()  : $this
Assign customer model to quote with billing and shipping address change
cleanModelCache()  : $this
Remove model object related cache
clearInstance()  : $this
Clearing object for correct deleting by garbage collector
collectTotals()  : $this
Collect totals
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
deleteItem()  : $this
Delete quote item. If it does not have identifier then it will be only removed from collection
flagDirty()  : $this
getAddressByCustomerAddressId()  : Mage_Sales_Model_Quote_Address|false
getAddressById()  : Mage_Sales_Model_Quote_Address|false
getAddressesCollection()  : Mage_Sales_Model_Resource_Order_Address_Collection
Retrieve quote address collection
getAllAddresses()  : array<string|int, Mage_Sales_Model_Quote_Address>
getAllItems()  : array<string|int, Mage_Sales_Model_Quote_Item>
Retrieve quote items array
getAllShippingAddresses()  : array<string|int, Mage_Sales_Model_Quote_Address>
getAllVisibleItems()  : array<string|int, Mage_Sales_Model_Quote_Item>
Get array of all items what can be display directly
getAppliedRuleIds()  : string|null
getBaseCurrencyCode()  : string|null
getBaseGrandTotal()  : float|null
getBaseSubtotal()  : float|null
getBaseSubtotalWithDiscount()  : float|null
getBaseToGlobalRate()  : float|null
getBaseToQuoteRate()  : float|null
getBillingAddress()  : Mage_Sales_Model_Quote_Address
Retrieve quote billing address
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.
getCanApplyMsrp()  : bool|null
getChangedFlag()  : bool|null
getCheckoutMethod()  : string
Return quote checkout method code
getCollection()  : Mage_Core_Model_Resource_Db_Collection_Abstract|false
getConvertedAt()  : string|null
getCouponCode()  : string
getCreatedAt()  : string|null
getCustomer()  : Mage_Customer_Model_Customer
Retrieve customer model object
getCustomerDob()  : string|null
getCustomerEmail()  : string|null
getCustomerFirstname()  : string|null
getCustomerGender()  : int|null
getCustomerGroupId()  : int
getCustomerId()  : int|null
getCustomerIsGuest()  : bool|null
getCustomerIsNew()  : bool|null
getCustomerLastname()  : string|null
getCustomerMiddlename()  : string|null
getCustomerNote()  : string|null
getCustomerNoteNotify()  : bool|null
getCustomerPrefix()  : string|null
getCustomerSuffix()  : string|null
getCustomerTaxClassId()  : mixed
getCustomerTaxvat()  : string|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
getEntityId()  : int
getErrors()  : array<string|int, mixed>
Retrieve current quote errors
getExtShippingInfo()  : string|null
getForcedCurrency()  : Mage_Directory_Model_Currency|null
getGiftMessageId()  : int|null
getGlobalCurrencyCode()  : string|null
getGrandTotal()  : float|null
getHasError()  : bool|null
getId()  : int|string|null
Retrieve model object identifier
getIdFieldName()  : string
Retrieve identifier field name for model
getIgnoreOldQty()  : bool|null
getInventoryProcessed()  : bool|null
getIsActive()  : bool|null
getIsChanged()  : bool|null
getIsCheckoutCart()  : bool|null
getIsMultiPayment()  : bool|null
getIsSuperMode()  : bool|null
getIsVirtual()  : bool
Check quote for virtual product only
getItemById()  : Mage_Sales_Model_Quote_Item
Retrieve item model object by item identifier
getItemByProduct()  : Mage_Sales_Model_Quote_Item|false
Retrieve quote item by product id
getItemsCollection()  : Mage_Sales_Model_Resource_Quote_Item_Collection
Retrieve quote items collection
getItemsCount()  : int|null
getItemsQty()  : float|null
getItemsSummaryQty()  : float|int|mixed
getItemVirtualQty()  : int|mixed
getMessages()  : array<string|int, Mage_Core_Model_Message_Abstract>
Retrieve current quote messages
getMethod()  : string|null
getOrigData()  : mixed
Get object loaded data (original data)
getOrigOrderId()  : int|null
getPasswordHash()  : string|null
getPayment()  : Mage_Sales_Model_Quote_Payment
getPaymentById()  : false|Mage_Sales_Model_Quote_Payment
getPaymentsCollection()  : Mage_Sales_Model_Resource_Quote_Payment_Collection
getQuoteCurrencyCode()  : string|null
getRemoteIp()  : string|null
getReservedOrderId()  : string|null
getResource()  : Mage_Sales_Model_Resource_Quote
Retrieve model resource
getResourceCollection()  : Mage_Core_Model_Resource_Db_Collection_Abstract
Get collection instance
getResourceName()  : string
Retrieve model resource name
getSharedStoreIds()  : array<string|int, mixed>
Get all available store ids for quote
getShippingAddress()  : Mage_Sales_Model_Quote_Address
Retrieve quote shipping address
getShippingAddressByCustomerAddressId()  : Mage_Sales_Model_Quote_Address|false
getStore()  : Mage_Core_Model_Store
Get quote store model object
getStoreCurrencyCode()  : string|null
getStoreId()  : int
Get quote store identifier
getStoreToBaseRate()  : float|null
getStoreToQuoteRate()  : float|null
getSubtotal()  : float|null
getSubtotalWithDiscount()  : float|null
getTaxesForItems()  : array<string|int, mixed>|null
getTotals()  : array<string|int, mixed>
Get all quote totals (sorted by priority) Method process quote states isVirtual
getTotalsCollectedFlag()  : bool|null
getTriggerRecollect()  : bool|null
getUpdatedAt()  : string|null
getVirtualItemsQty()  : float|null
getWebsite()  : Mage_Core_Model_Website|null
hasCanApplyMsrp()  : bool
hasChangedFlag()  : 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
hasForcedCurrency()  : bool
hasItems()  : bool
Checking items availability
hasItemsCollection()  : bool
hasItemsWithDecimalQty()  : bool
Checking availability of items with decimal qty
hasNominalItems()  : bool
Getter whether quote has nominal items Can bypass treating virtual items as nominal
hasProductId()  : bool
Checking product exist in Quote
hasRecurringItems()  : bool
Whether there are recurring items
hasStoreId()  : bool
hasVirtualItems()  : bool
Has a virtual products on quote
isAllowedGuestCheckout()  : bool
Check is allow Guest Checkout
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
isNominal()  : bool
Whether quote has nominal items only
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
isVirtual()  : bool
Check quote for virtual product only
jsonSerialize()  : array<string|int, mixed>
Implementation of JsonSerializable::jsonSerialize()
load()  : $this
Load object data
loadActive()  : $this
Loading only active quote
loadByCustomer()  : $this
Loading quote data by customer
loadByIdWithoutStore()  : $this
Loading quote by identifier
merge()  : $this
Merge quotes
offsetExists()  : bool
Implementation of ArrayAccess::offsetExists()
offsetGet()  : mixed
Implementation of ArrayAccess::offsetGet()
offsetSet()  : void
Implementation of ArrayAccess::offsetSet()
offsetUnset()  : void
Implementation of ArrayAccess::offsetUnset()
prepareRecurringPaymentProfiles()  : array<string|int, Mage_Payment_Model_Recurring_Profile>
Create recurring payment profiles basing on the current items
preventSaving()  : $this
Prevent quote from saving
refreshCurrencyStamp()  : static
Restate which currency this quote's amounts are in, from the store as it is right now. Shared with placement, which needs these fields refreshed without saving, so the two can never drift apart.
removeAddress()  : $this
removeAllAddresses()  : $this
Leave no more than one billing and one shipping address, fill them with default data
removeAllItems()  : $this
Mark all quote items as deleted (empty quote)
removeErrorInfosByParams()  : $this
Removes error infos, that have parameters equal to passed in $params.
removeItem()  : $this
Remove quote item by item identifier
removeMessageByText()  : $this
Removes message by text
removePayment()  : $this
reserveOrderId()  : $this
Generate new increment order id and associate it with current quote
save()  : $this
Save quote with prevention checking
serialize()  : string
serialize object attributes
setAppliedRuleIds()  : static
setAttribute()  : $this
setBaseCurrencyCode()  : static
setBaseGrandTotal()  : static
setBaseSubtotal()  : static
setBaseSubtotalWithDiscount()  : static
setBaseToGlobalRate()  : static
setBaseToQuoteRate()  : static
setBillingAddress()  : $this
setCheckoutMethod()  : static
setConvertedAt()  : static
setCouponCode()  : $this
setCreatedAt()  : static
setCustomer()  : $this
Define customer object
setCustomerDob()  : static
setCustomerEmail()  : static
setCustomerFirstname()  : static
setCustomerGender()  : static
setCustomerGroupId()  : static
setCustomerId()  : static
setCustomerIsGuest()  : static
setCustomerIsNew()  : static
setCustomerLastname()  : static
setCustomerMiddlename()  : static
setCustomerNote()  : static
setCustomerNoteNotify()  : static
setCustomerPrefix()  : static
setCustomerSuffix()  : static
setCustomerTaxClassId()  : static
setCustomerTaxvat()  : static
setData()  : $this
Overwrite data in the object.
setDataChanges()  : $this
Clears data changes status
setDataUsingMethod()  : $this
Set object data with calling setter method
setExtShippingInfo()  : static
setForcedCurrency()  : static
Price this quote in a currency other than the store's, refusing one with no rate from base.
setGiftMessage()  : static
setGiftMessageId()  : static
setGlobalCurrencyCode()  : static
setGrandTotal()  : static
setHasError()  : $this
Sets flag, whether this quote has some error associated with it.
setId()  : $this
Declare model object identifier value
setIdFieldName()  : $this
set name of object id field
setIgnoreOldQty()  : static
setInventoryProcessed()  : static
setIsActive()  : static
setIsChanged()  : static
setIsCheckoutCart()  : static
setIsSuperMode()  : static
setIsVirtual()  : static
setItemsCount()  : static
setItemsQty()  : static
setOrderId()  : static
setOrigData()  : $this
Initialize object original data
setOrigOrderId()  : static
setPasswordHash()  : static
setPayment()  : Mage_Sales_Model_Quote_Payment
setQuoteCurrencyCode()  : static
setRemoteIp()  : static
setReservedOrderId()  : static
setSharedStoreIds()  : static
setShippingAddress()  : $this
setStore()  : $this
Declare quote store model
setStoreCurrencyCode()  : static
setStoreId()  : static
setStoreToBaseRate()  : static
setStoreToQuoteRate()  : static
setSubtotal()  : static
setSubtotalWithDiscount()  : static
setTaxesForItems()  : static
setTotalsCollectedFlag()  : static
setTriggerRecollect()  : static
setUpdatedAt()  : static
setVirtualItemsQty()  : static
setWebsite()  : static
setXForwardedFor()  : static
toArray()  : array<string|int, mixed>
Public wrapper for __toArray
toJson()  : string
Public wrapper for __toJson
toString()  : string
Public wrapper for __toString
toXml()  : string
Public wrapper for __toXml
unsetData()  : $this
Unset data from the object.
unsetOldData()  : $this
Unset old fields data from the object.
updateItem()  : Mage_Sales_Model_Quote_Item
Updates quote item with new configuration
validateMinimumAmount()  : bool
__toJson()  : string
Convert object attributes to JSON
__toXml()  : string
Convert object attributes to XML
_addCatalogProduct()  : Mage_Sales_Model_Quote_Item
Adding catalog product object data to quote
_addFullNames()  : mixed
_afterDelete()  : $this
Processing object after delete data
_afterDeleteCommit()  : $this
Processing manipulation after main transaction commit
_afterLoad()  : $this
Trigger collect totals after loading, if required
_afterSave()  : $this
Save related items
_beforeDelete()  : $this
Delete custom option files before deleting quote
_beforeLoad()  : $this
Processing object before load data
_beforeSave()  : $this
Processing object before save data
_camelize()  : string
_clearData()  : $this
Clearing object's data
_clearErrorInfo()  : $this
Clears list of errors, associated with this quote.
_clearReferences()  : $this
Clearing cyclic references
_construct()  : void
Init resource model
_getAddressByType()  : Mage_Sales_Model_Quote_Address
Retrieve quote address by type
_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
Check whether model has changed data.
_init()  : mixed
Standard model initialization
_initOldFieldsMap()  : DataObject
Init mapping array of short fields to its full names
_prepareArray()  : array<string|int, mixed>
Set required array elements
_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
_setHasError()  : $this
Sets flag, whether this quote has some error associated with it.
_setResourceModel()  : mixed
Set resource names
_underscore()  : string
Converts field names for setters and getters
_validateCouponCode()  : $this

Properties

$_cacheTag

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

protected string|bool|array<string|int, mixed> $_cacheTag = 'quote'

When you use true - all cache will be clean

Attributes
#[Override]

$_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

$_errorInfoGroups

Different groups of error infos

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

$_eventObject

Parameter name in event

protected string $_eventObject = 'quote'

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'
Attributes
#[Override]

$_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

$_oldFieldsMap

Map short fields names to its full names

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

$_origData

Original data that was loaded

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

$_preventSaving

Whether quote should not be saved

protected bool $_preventSaving = \false

$_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>

__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.

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

Automatically sets error flag.

Parameters
$type : string = 'error'

An internal error type ('error', 'qty', etc.), passed then to adding messages routine

$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()

public addMessage(string $message[, string $index = 'error' ]) : $this
Parameters
$message : string
$index : string = 'error'
Return values
$this

addProductAdvanced()

Advanced func to add product to quote - processing mode can be specified there.

public addProductAdvanced(Mage_Catalog_Model_Product $product[, null|float|DataObject $request = null ][, null|string $processMode = null ]) : Mage_Sales_Model_Quote_Item|string

Returns error message if product type instance can't prepare product.

Parameters
$product : Mage_Catalog_Model_Product
$request : null|float|DataObject = null
$processMode : null|string = null
Return values
Mage_Sales_Model_Quote_Item|string

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

assignCustomerWithAddressChange()

Assign customer model to quote with billing and shipping address change

public assignCustomerWithAddressChange(Mage_Customer_Model_Customer $customer[, Mage_Sales_Model_Quote_Address|null $billingAddress = null ][, Mage_Sales_Model_Quote_Address|null $shippingAddress = null ]) : $this
Parameters
$customer : Mage_Customer_Model_Customer
$billingAddress : Mage_Sales_Model_Quote_Address|null = null
$shippingAddress : Mage_Sales_Model_Quote_Address|null = null
Tags
throws
Mage_Core_Exception
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

collectTotals()

Collect totals

public collectTotals() : $this
Return values
$this

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

getAppliedRuleIds()

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

getBaseCurrencyCode()

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

getBaseGrandTotal()

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

getBaseSubtotal()

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

getBaseSubtotalWithDiscount()

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

getBaseToGlobalRate()

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

getBaseToQuoteRate()

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

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

getCanApplyMsrp()

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

getChangedFlag()

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

getCheckoutMethod()

Return quote checkout method code

public getCheckoutMethod([bool $originalMethod = false ]) : string
Parameters
$originalMethod : bool = false

if true return defined method from beginning

Return values
string

getConvertedAt()

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

getCouponCode()

public getCouponCode() : string
Return values
string

getCreatedAt()

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

getCustomerDob()

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

getCustomerEmail()

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

getCustomerFirstname()

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

getCustomerGender()

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

getCustomerGroupId()

public getCustomerGroupId() : int
Return values
int

getCustomerId()

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

getCustomerIsGuest()

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

getCustomerIsNew()

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

getCustomerLastname()

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

getCustomerMiddlename()

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

getCustomerNote()

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

getCustomerNoteNotify()

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

getCustomerPrefix()

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

getCustomerSuffix()

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

getCustomerTaxClassId()

public getCustomerTaxClassId() : mixed

getCustomerTaxvat()

public getCustomerTaxvat() : string|null
Return values
string|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

getEntityId()

public getEntityId() : int
Return values
int

getErrors()

Retrieve current quote errors

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

getExtShippingInfo()

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

getGiftMessageId()

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

getGlobalCurrencyCode()

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

getGrandTotal()

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

getHasError()

public getHasError() : bool|null
Return values
bool|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

getIgnoreOldQty()

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

getInventoryProcessed()

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

getIsActive()

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

getIsChanged()

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

getIsCheckoutCart()

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

getIsMultiPayment()

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

getIsSuperMode()

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

getIsVirtual()

Check quote for virtual product only

public getIsVirtual() : bool
Return values
bool

getItemsCount()

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

getItemsQty()

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

getItemsSummaryQty()

public getItemsSummaryQty() : float|int|mixed
Return values
float|int|mixed

getItemVirtualQty()

public getItemVirtualQty() : int|mixed
Return values
int|mixed

getMethod()

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

getOrigData()

Get object loaded data (original data)

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

getOrigOrderId()

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

getPasswordHash()

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

getQuoteCurrencyCode()

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

getRemoteIp()

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

getReservedOrderId()

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

getResourceName()

Retrieve model resource name

public getResourceName() : string
Return values
string

getSharedStoreIds()

Get all available store ids for quote

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

getStoreCurrencyCode()

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

getStoreId()

Get quote store identifier

public getStoreId() : int
Return values
int

getStoreToBaseRate()

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

getStoreToQuoteRate()

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

getSubtotal()

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

getSubtotalWithDiscount()

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

getTaxesForItems()

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

getTotals()

Get all quote totals (sorted by priority) Method process quote states isVirtual

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

getTotalsCollectedFlag()

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

getTriggerRecollect()

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

getUpdatedAt()

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

getVirtualItemsQty()

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

hasCanApplyMsrp()

public hasCanApplyMsrp() : bool
Return values
bool

hasChangedFlag()

public hasChangedFlag() : 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

hasForcedCurrency()

public hasForcedCurrency() : bool
Return values
bool

hasItems()

Checking items availability

public hasItems() : bool
Return values
bool

hasItemsCollection()

public hasItemsCollection() : bool
Return values
bool

hasItemsWithDecimalQty()

Checking availability of items with decimal qty

public hasItemsWithDecimalQty() : bool
Return values
bool

hasNominalItems()

Getter whether quote has nominal items Can bypass treating virtual items as nominal

public hasNominalItems([bool $countVirtual = true ]) : bool
Parameters
$countVirtual : bool = true
Return values
bool

hasProductId()

Checking product exist in Quote

public hasProductId(int $productId) : bool
Parameters
$productId : int
Return values
bool

hasRecurringItems()

Whether there are recurring items

public hasRecurringItems() : bool
Return values
bool

hasStoreId()

public hasStoreId() : bool
Return values
bool

hasVirtualItems()

Has a virtual products on quote

public hasVirtualItems() : bool
Return values
bool

isAllowedGuestCheckout()

Check is allow Guest Checkout

public isAllowedGuestCheckout() : 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

isNominal()

Whether quote has nominal items only

public isNominal() : bool
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

isVirtual()

Check quote for virtual product only

public isVirtual() : 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

loadActive()

Loading only active quote

public loadActive(int $quoteId) : $this
Parameters
$quoteId : int
Return values
$this

loadByIdWithoutStore()

Loading quote by identifier

public loadByIdWithoutStore(int $quoteId) : $this
Parameters
$quoteId : int
Return values
$this

preventSaving()

Prevent quote from saving

public preventSaving() : $this
Return values
$this

refreshCurrencyStamp()

Restate which currency this quote's amounts are in, from the store as it is right now. Shared with placement, which needs these fields refreshed without saving, so the two can never drift apart.

public refreshCurrencyStamp() : static

global - currency which is set for default in backend base - currency which is set for current website. all attributes that have 'base_' prefix saved in this currency store - all the time it was currency of website and all attributes with 'base_' were saved in this currency. From now on it is deprecated and will be duplication of base currency code. quote/order - currency which was selected by customer or configured by admin for current store. currency in which customer sees price thought all checkout.

Rates: store_to_base & store_to_quote/store_to_order - are deprecated base_to_global & base_to_quote/base_to_order - must be used instead

Return values
static

removeAddress()

public removeAddress(int $addressId) : $this
Parameters
$addressId : int
Return values
$this

removeAllAddresses()

Leave no more than one billing and one shipping address, fill them with default data

public removeAllAddresses() : $this
Return values
$this

removeAllItems()

Mark all quote items as deleted (empty quote)

public removeAllItems() : $this
Return values
$this

removeErrorInfosByParams()

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

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

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

Parameters
$type : string|null

An internal error type ('error', 'qty', etc.), passed then to adding messages routine

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

removeItem()

Remove quote item by item identifier

public removeItem(int $itemId) : $this
Parameters
$itemId : int
Return values
$this

removeMessageByText()

Removes message by text

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

removePayment()

public removePayment() : $this
Return values
$this

reserveOrderId()

Generate new increment order id and associate it with current quote

public reserveOrderId() : $this
Return values
$this

save()

Save quote with prevention checking

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

setAppliedRuleIds()

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

setBaseCurrencyCode()

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

setBaseGrandTotal()

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

setBaseSubtotal()

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

setBaseSubtotalWithDiscount()

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

setBaseToGlobalRate()

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

setBaseToQuoteRate()

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

setCheckoutMethod()

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

setConvertedAt()

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

setCouponCode()

public setCouponCode(string|null $couponCode) : $this
Parameters
$couponCode : string|null
Return values
$this

setCreatedAt()

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

setCustomerDob()

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

setCustomerEmail()

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

setCustomerFirstname()

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

setCustomerGender()

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

setCustomerGroupId()

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

setCustomerId()

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

setCustomerIsGuest()

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

setCustomerIsNew()

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

setCustomerLastname()

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

setCustomerMiddlename()

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

setCustomerNote()

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

setCustomerNoteNotify()

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

setCustomerPrefix()

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

setCustomerSuffix()

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

setCustomerTaxClassId()

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

setCustomerTaxvat()

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

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

setExtShippingInfo()

public setExtShippingInfo(string|null $value) : static
Parameters
$value : string|null
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

setGlobalCurrencyCode()

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

setGrandTotal()

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

setHasError()

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

public setHasError(bool $flag) : $this

When TRUE - also adds 'unknown' error information to list of quote errors. When FALSE - clears whole list of quote errors. It's recommended to use addErrorInfo() instead - to be able to remove error statuses later.

Parameters
$flag : bool
Tags
see
addErrorInfo()
Return values
$this

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

setIgnoreOldQty()

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

setInventoryProcessed()

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

setIsActive()

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

setIsChanged()

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

setIsCheckoutCart()

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

setIsSuperMode()

public setIsSuperMode([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

setItemsCount()

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

setItemsQty()

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

setOrderId()

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

setOrigData()

Initialize object original data

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

setOrigOrderId()

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

setPasswordHash()

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

setQuoteCurrencyCode()

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

setRemoteIp()

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

setReservedOrderId()

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

setSharedStoreIds()

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

setStoreCurrencyCode()

public setStoreCurrencyCode(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

setStoreToBaseRate()

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

setStoreToQuoteRate()

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

setSubtotal()

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

setSubtotalWithDiscount()

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

setTaxesForItems()

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

setTotalsCollectedFlag()

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

setTriggerRecollect()

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

setUpdatedAt()

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

setVirtualItemsQty()

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

setXForwardedFor()

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

toArray()

Public wrapper for __toArray

public toArray([array<string|int, mixed> $arrAttributes = [] ]) : array<string|int, mixed>
Parameters
$arrAttributes : array<string|int, mixed> = []
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

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

updateItem()

Updates quote item with new configuration

public updateItem(int $itemId, DataObject $buyRequest[, null|array<string|int, mixed>|DataObject $params = null ]) : Mage_Sales_Model_Quote_Item

$params sets how current item configuration must be taken into account and additional options. It's passed to Mage_Catalog_Helper_Product->addParamsToBuyRequest() to compose resulting buyRequest.

Basically it can hold

  • 'current_config', \Maho\DataObject or array - current buyRequest that configures product in this item, used to restore currently attached files
  • 'files_prefix': string[a-z0-9_] - prefix that was added at frontend to names of file options (file inputs), so they won't intersect with other submitted options

For more options see Mage_Catalog_Helper_Product->addParamsToBuyRequest()

Parameters
$itemId : int
$buyRequest : DataObject
$params : null|array<string|int, mixed>|DataObject = null
Tags
see
Mage_Catalog_Helper_Product::addParamsToBuyRequest()
Return values
Mage_Sales_Model_Quote_Item

validateMinimumAmount()

public validateMinimumAmount() : bool
Return values
bool

__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()

Trigger collect totals after loading, if required

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

_afterSave()

Save related items

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

_beforeDelete()

Delete custom option files before deleting quote

protected _beforeDelete() : $this
Attributes
#[Override]
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()

Processing object before save data

protected _beforeSave() : $this
Tags
throws
Mage_Core_Exception
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.

protected _clearErrorInfo() : $this

Also automatically removes error-flag from oneself.

Return values
$this

_clearReferences()

Clearing cyclic references

protected _clearReferences() : $this
Return values
$this

_construct()

Init resource model

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()

Check whether model has changed data.

protected _hasModelChanged() : bool

Can be overloaded in child classes to perform advanced check whether model needs to be saved e.g. using resourceModel->hasDataChanged() or any other technique

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() : DataObject
Attributes
#[Override]
Return values
DataObject

_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>

_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

_setHasError()

Sets flag, whether this quote 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

_validateCouponCode()

protected _validateCouponCode() : $this
Return values
$this
On this page

Search results