Documentation

Mage_Sales_Model_Quote_Address extends Mage_Customer_Model_Address_Abstract
in package

Address abstract model

Table of Contents

Constants

DEFAULT_DEST_STREET  : mixed = -1
Default value for Destination street
TEXT_FIELD_LENGTHS  : mixed = ['firstname' => 255, 'middlename' => 40, 'lastn...
The text fields that sanitizeText() cleans, with the maximum length of each. Each line of the street has the length of the street.
TYPE_BILLING  : mixed = 'billing'
Possible customer address types
TYPE_SHIPPING  : mixed = 'shipping'

Properties

$_baseTotalAmounts  : array<string|int, mixed>
Total base amounts
$_cacheTag  : string|bool|array<string|int, mixed>
Model cache tag for clear cache in after save and after delete
$_countryModels  : array<string|int, mixed>
Directory country models
$_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>
$_errors  : array<string|int, mixed>
List of errors
$_eventObject  : string
Name of event object
$_eventPrefix  : string
Prefix of model events
$_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_Address_Item_Collection|array<string|int, Mage_Sales_Model_Quote_Address_Item>|null
Quote object
$_oldFieldsMap  : array<string|int, mixed>
Map short fields names to its full names
$_origData  : array<string|int, mixed>|null
Original data that was loaded
$_quote  : Mage_Sales_Model_Quote
Quote object
$_rates  : Mage_Sales_Model_Resource_Quote_Address_Rate_Collection|array<string|int, Mage_Sales_Model_Quote_Address_Rate>|null
Sales Quote address rates
$_regionModels  : array<string|int, mixed>
Directory region models
$_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
$_totalAmounts  : array<string|int, mixed>
Total amounts
$_totalCollector  : Mage_Sales_Model_Quote_Address_Total_Collector
Total models collector
$_totals  : array<string|int, mixed>
Total data as array
$_underscoreCache  : array<string|int, mixed>
Setter/Getter underscore transformation cache

Methods

__call()  : mixed
Set/Get attribute wrapper
__clone()  : mixed
Rewrite clone method
__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_Address
Get resource instance
addBaseTotalAmount()  : $this
Add amount total amount value in base store currency
addData()  : $this
Add data to the object.
addError()  : $this
Add error
addItem()  : $this
Add item to address
addShippingRate()  : $this
Add shipping rate
addTotal()  : $this
Add total data or model
addTotalAmount()  : $this
Add amount total amount value
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
cleanModelCache()  : $this
Remove model object related cache
clearInstance()  : $this
Clearing object for correct deleting by garbage collector
collectShippingRates()  : $this
Collecting shipping rates by address
collectTotals()  : $this
Collect address totals
collectWeight()  : static
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
explodeStreetAddress()  : mixed
Create fields street1, street2, etc.
exportCustomerAddress()  : Mage_Customer_Model_Address
Export data to customer address object
flagDirty()  : $this
format()  : string|null
getAddressType()  : string|null
getAllBaseTotalAmounts()  : array<string|int, mixed>
Get all total amount values in base currency
getAllItems()  : array<string|int, Mage_Sales_Model_Quote_Address_Item>
Get all available address items
getAllNonNominalItems()  : array<string|int, Mage_Sales_Model_Quote_Address_Item>
getAllShippingRates()  : array<string|int, Mage_Sales_Model_Quote_Address_Rate>
Retrieve all address shipping rates
getAllTotalAmounts()  : array<string|int, mixed>
Get all total amount values
getAllVisibleItems()  : array<string|int, Mage_Sales_Model_Quote_Address_Item>
Retrieve all visible items
getAppliedRuleIds()  : string|null
getAppliedTaxes()  : array<string|int, mixed>
Retrieve applied taxes
getAppliedTaxesReset()  : bool|null
getBaseCustbalanceAmount()  : float|null
getBaseDiscountAmount()  : float|null
getBaseExtraTaxAmount()  : float|null
getBaseGrandTotal()  : float|null
getBaseHiddenTaxAmount()  : float|null
getBaseRowTotal()  : float|null
getBaseShippingAmount()  : float|null
getBaseShippingAmountForDiscount()  : float|null
getBaseShippingDiscountAmount()  : float|null
getBaseShippingHiddenTaxAmount()  : float|null
getBaseShippingInclTax()  : float|null
getBaseShippingTaxable()  : float|null
getBaseShippingTaxAmount()  : float|null
getBaseSubtotal()  : float|null
getBaseSubtotalInclTax()  : float|null
getBaseSubtotalTotalInclTax()  : float|null
getBaseSubtotalWithDiscount()  : float
Get subtotal amount with applied discount in base currency
getBaseTaxAmount()  : float|null
getBaseTotalAmount()  : float
Get total amount value by code in base store curncy
getBaseVirtualAmount()  : float|null
getBaseWeeeDiscount()  : float|null
getBillingAddress()  : Mage_Customer_Model_Address_Abstract|null
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.
getCartFixedRules()  : array<string|int, mixed>|null
getChildren()  : array<string|int, mixed>|null
getCity()  : string|null
getCollection()  : Mage_Sales_Model_Resource_Quote_Address_Collection
getCollectShippingRates()  : bool|null
getCompany()  : string|null
getConfig()  : Mage_Customer_Model_Address_Config
Retrieve address config object
getCountry()  : string
getCountryId()  : string|null
getCountryModel()  : Mage_Directory_Model_Country
Retrieve country model
getCouponCode()  : string
getCreatedAt()  : string|null
getCustbalanceAmount()  : float|null
getCustomerAddress()  : Mage_Customer_Model_Address|null
getCustomerAddressId()  : int|null
getCustomerId()  : int|null
getCustomerNotes()  : string|null
getCustomerPassword()  : 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
getDiscountAmount()  : float|null
getDiscountDescription()  : string|null
getDiscountDescriptionArray()  : array<string|int, mixed>|null
getDiscountTaxCompensation()  : float|null
getDob()  : string|null
getEmail()  : string|null
getEntityId()  : int
getExtraTaxAmount()  : float|null
getFax()  : string|null
getFirstname()  : string|null
getForceProcess()  : bool|null
getFormated()  : string
getFormatErrors()  : array<string|int, string>
Check the postcode format of the country, and that the region belongs to the country.
getFreeMethodWeight()  : float|null
getFreeShipping()  : bool|null
getGender()  : string|null
getGiftMessageId()  : int|null
getGrandTotal()  : float|null
getGroupedAllShippingRates()  : array<string|int, mixed>
Retrieve all grouped shipping rates
getHasChildren()  : bool|null
getHiddenTaxAmount()  : float|null
getHtmlFormat()  : DataObject
Retrieve HTML address format
getId()  : int|string|null
Retrieve model object identifier
getIdFieldName()  : string
Retrieve identifier field name for model
getIsCustomerSaveTransaction()  : bool|null
getIsDefaultBilling()  : bool|null
getIsDefaultShipping()  : bool|null
getIsPrimaryBilling()  : bool|null
getIsPrimaryShipping()  : bool|null
getIsShippingInclTax()  : bool|null
getItemById()  : Mage_Sales_Model_Quote_Address_Item|false
Get address item object by id without
getItemByQuoteItemId()  : Mage_Sales_Model_Quote_Address_Item|false
Retrieve item object by quote item Id
getItemQty()  : float|int
Retrieve item quantity by id
getItemsCollection()  : Mage_Sales_Model_Resource_Quote_Address_Item_Collection
Retrieve address items collection
getLastname()  : string|null
getLimitCarrier()  : string|null
getMiddlename()  : string|null
getName()  : string
Get full customer name
getOrigData()  : mixed
Get object loaded data (original data)
getParentId()  : int|null
getParentItem()  : Mage_Sales_Model_Quote_Address|null
getParentItemId()  : int|null
getPostcode()  : string|null
getPrefix()  : string|null
getProduct()  : Mage_Catalog_Model_Product|null
getQty()  : float|null
getQuote()  : Mage_Sales_Model_Quote
Retrieve quote object
getQuoteId()  : int|null
getRegion()  : string
Retrieve region name
getRegionCode()  : mixed
Return 2 letter state code if available, otherwise full region name
getRegionId()  : int|null
getRegionModel()  : Mage_Directory_Model_Country
Retrieve country model
getResource()  : Mage_Sales_Model_Resource_Quote_Address
Retrieve model resource
getResourceCollection()  : Mage_Core_Model_Resource_Db_Collection_Abstract
Get collection instance
getResourceName()  : string
Retrieve model resource name
getRoundingDeltas()  : array<string|int, mixed>|null
getRowTotal()  : float|null
getSameAsBilling()  : bool|null
getSaveInAddressBook()  : bool|null
getShippingAddress()  : Mage_Customer_Model_Address_Abstract|null
getShippingAmount()  : float|null
Get shipping amount with proper float casting DBAL returns DECIMAL as string, so we cast to float
getShippingAmountForDiscount()  : float|null
getShippingDescription()  : string|null
getShippingDiscountAmount()  : float|null
getShippingDiscountPercent()  : float|null
getShippingHiddenTaxAmount()  : float|null
getShippingInclTax()  : float|null
getShippingMethod()  : string|null
getShippingRateByCode()  : Mage_Sales_Model_Quote_Address_Rate|false
Retrieve shipping rate by code
getShippingRateById()  : Mage_Sales_Model_Quote_Address_Rate|false
Retrieve shipping rate by identifier
getShippingRatesCollection()  : Mage_Sales_Model_Resource_Quote_Address_Rate_Collection
Retrieve collection of quote shipping rates
getShippingTaxable()  : float|null
getShippingTaxAmount()  : float|null
getShouldIgnoreValidation()  : bool|null
getStoreId()  : int|null
getStreet()  : string|array<string|int, mixed>
get address street
getStreet1()  : string
getStreet2()  : string
getStreet3()  : string
getStreet4()  : string
getStreetFull()  : string
getSubtotal()  : float|null
getSubtotalInclTax()  : float|null
getSubtotalWithDiscount()  : float
Get subtotal amount with applied discount
getSuffix()  : string|null
getTaxAmount()  : float|null
getTaxvat()  : string|null
getTelephone()  : string|null
getTotalAmount()  : float
Get total amount value by code
getTotalCollector()  : Mage_Sales_Model_Quote_Address_Total_Collector
Get totals collector model
getTotalModels()  : array<string|int, mixed>
Retrieve total models
getTotalQty()  : float|null
getTotals()  : array<string|int, Mage_Sales_Model_Quote_Address_Total>
Get address totals as array
getUpdatedAt()  : string|null
getValidItemById()  : Mage_Sales_Model_Quote_Address_Item|false
Get prepared not deleted item
getVatId()  : string|null
getVatIsValid()  : bool|null
getVatRequestDate()  : string|null
getVatRequestId()  : string|null
getVatRequestSuccess()  : bool|null
getWeeeDiscount()  : float|null
getWeight()  : float|null
hasCouponCode()  : 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
hasItems()  : bool
Check Quote address has Items
hasPaymentMethod()  : bool
implodeStreetAddress()  : mixed
To be used when processing _POST
importCustomerAddress()  : $this
Import quote address data from customer address object
importOrderAddress()  : $this
Import address data from order address
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
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()
removeAllShippingRates()  : $this
Mark all shipping rates as deleted
removeItem()  : $this
Remove item from collection
requestShippingRates()  : bool
Request shipping rates for entire address or specified address item Returns true if current selected shipping method code corresponds to one of the found rates
sanitizeText()  : static
Remove the HTML tags from the text fields, and cut each field to its maximum length.
save()  : $this
Save object data
serialize()  : string
serialize object attributes
setAddressType()  : static
setAppliedRuleIds()  : static
setAppliedTaxes()  : $this
Set applied taxes
setAppliedTaxesReset()  : static
setAttribute()  : $this
setBaseCustbalanceAmount()  : static
setBaseDiscountAmount()  : static
setBaseExtraTaxAmount()  : static
setBaseGrandTotal()  : static
setBaseHiddenTaxAmount()  : static
setBaseShippingAmount()  : $this
Set base shipping amount
setBaseShippingAmountForDiscount()  : static
setBaseShippingDiscountAmount()  : static
setBaseShippingHiddenTaxAmount()  : static
setBaseShippingInclTax()  : static
setBaseShippingTaxable()  : static
setBaseShippingTaxAmount()  : static
setBaseSubtotal()  : static
setBaseSubtotalInclTax()  : static
setBaseSubtotalTotalInclTax()  : static
setBaseSubtotalWithDiscount()  : static
setBaseTaxAmount()  : static
setBaseTotalAmount()  : $this
Set total amount value in base store currency
setBaseVirtualAmount()  : static
setBaseWeeeDiscount()  : static
setCartFixedRules()  : static
setCity()  : static
setCollectShippingRates()  : static
setCompany()  : static
setCountryId()  : static
setCouponCode()  : static
setCreatedAt()  : static
setCustbalanceAmount()  : static
setCustomerAddress()  : static
setCustomerAddressId()  : static
setCustomerId()  : static
setCustomerNotes()  : static
setData()  : $this
Overwrite data in the object.
setDataChanges()  : $this
Clears data changes status
setDataUsingMethod()  : $this
Set object data with calling setter method
setDeleteImmediately()  : static
setDiscountAmount()  : static
setDiscountDescription()  : static
setDiscountDescriptionArray()  : static
setEmail()  : static
setExtraTaxAmount()  : static
setFax()  : static
setFirstname()  : static
setForceProcess()  : static
setFreeMethodWeight()  : static
setFreeShipping()  : static
setGiftMessageId()  : static
setGrandTotal()  : static
setHiddenTaxAmount()  : static
setId()  : $this
Declare model object identifier value
setIdFieldName()  : $this
set name of object id field
setIsCustomerSaveTransaction()  : static
setIsDefaultBilling()  : static
setIsDefaultShipping()  : static
setIsPrimaryBilling()  : static
setIsPrimaryShipping()  : static
setIsShippingInclTax()  : static
setItemQty()  : static
setLastname()  : static
setMiddlename()  : static
setOrigData()  : $this
Initialize object original data
setParentId()  : static
setPaymentMethod()  : static
setPostcode()  : static
setPrefix()  : static
setPrevQuoteCustomerGroupId()  : static
setQuote()  : $this
Declare address quote model object
setQuoteId()  : static
setRegion()  : static
setRegionId()  : static
setRoundingDeltas()  : static
setRowWeight()  : static
setSameAsBilling()  : static
setSaveInAddressBook()  : static
setShippingAmount()  : $this
Set shipping amount
setShippingAmountForDiscount()  : static
setShippingDescription()  : static
setShippingDiscountAmount()  : static
setShippingDiscountPercent()  : static
setShippingHiddenTaxAmount()  : static
setShippingInclTax()  : static
setShippingMethod()  : static
setShippingTaxable()  : static
setShippingTaxAmount()  : static
setStoreId()  : static
setStreet()  : $this
set address street
setStreetFull()  : Mage_Customer_Model_Address_Abstract
setSubtotal()  : static
setSubtotalInclTax()  : static
setSubtotalWithDiscount()  : static
setSuffix()  : static
setTaxAmount()  : static
setTelephone()  : static
setTotalAmount()  : $this
Set total amount value
setTotalQty()  : static
setUpdatedAt()  : static
setVirtualAmount()  : static
setWeeeDiscount()  : static
setWeight()  : static
toArray()  : array<string|int, mixed>
Convert object to array
toJson()  : string
Public wrapper for __toJson
toString()  : string
Public wrapper for __toString
toXml()  : string
Public wrapper for __toXml
unsAddressId()  : $this
unsAddressType()  : $this
unsBaseSubtotalInclTax()  : $this
unsetData()  : $this
Unset data from the object.
unsetOldData()  : $this
Unset old fields data from the object.
unsRegion()  : $this
unsSubtotalInclTax()  : $this
validate()  : array<string|int, mixed>|bool
Validate address attribute values
validateMinimumAmount()  : bool
Validate minimum amount
__toJson()  : string
Convert object attributes to JSON
__toXml()  : string
Convert object attributes to XML
_addFullNames()  : mixed
_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 child collections
_basicCheck()  : mixed
Perform basic validation
_beforeDelete()  : $this
Processing object before delete data
_beforeLoad()  : $this
Processing object before load data
_beforeSave()  : $this
Initialize Quote identifier before save
_camelize()  : string
_clearData()  : $this
Clearing object's data
_clearReferences()  : $this
Clearing cyclic references
_construct()  : void
Initialize resource
_getData()  : mixed
Get value from _data array without parse key
_getErrors()  : array<string|int, mixed>
Retrieve errors
_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()  : $this
Init mapping array of short fields to its full names
_isDefaultShippingNullOrSameAsBillingAddress()  : bool
Returns true if the def billing address is same as customer address
_isNotRegisteredCustomer()  : bool
Checks if the user is a registered customer
_isSameAsBilling()  : bool
Returns true if the billing address is same as the shipping
_populateBeforeSaveData()  : mixed
Set the required fields
_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
_resetErrors()  : $this
Reset errors array
_setResourceModel()  : mixed
Set resource names
_sortRates()  : int
Sort rates recursive callback
_underscore()  : string
Converts field names for setters and getters

Constants

DEFAULT_DEST_STREET

Default value for Destination street

public mixed DEFAULT_DEST_STREET = -1

TEXT_FIELD_LENGTHS

The text fields that sanitizeText() cleans, with the maximum length of each. Each line of the street has the length of the street.

public mixed TEXT_FIELD_LENGTHS = ['firstname' => 255, 'middlename' => 40, 'lastname' => 255, 'prefix' => 40, 'suffix' => 40, 'company' => 255, 'street' => 255, 'city' => 255, 'region' => 255, 'postcode' => 20, 'telephone' => 50, 'fax' => 50, 'email' => 255, 'vat_id' => 50]

TYPE_BILLING

Possible customer address types

public mixed TYPE_BILLING = 'billing'

TYPE_SHIPPING

public mixed TYPE_SHIPPING = 'shipping'

Properties

$_baseTotalAmounts

Total base amounts

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

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

$_countryModels

Directory country models

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

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

$_errors

List of errors

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

$_eventObject

Name of event object

protected string $_eventObject = 'quote_address'
Attributes
#[Override]

$_eventPrefix

Prefix of model events

protected string $_eventPrefix = 'sales_quote_address'
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

$_regionModels

Directory region models

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

$_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 = []

$_totalAmounts

Total amounts

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

$_totals

Total data as array

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

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

Rewrite clone method

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

addBaseTotalAmount()

Add amount total amount value in base store currency

public addBaseTotalAmount(string $code, float $amount) : $this
Parameters
$code : string
$amount : float
Return values
$this

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

addError()

Add error

public addError(string $error) : $this
Parameters
$error : string
Return values
$this

addTotalAmount()

Add amount total amount value

public addTotalAmount(string $code, float $amount) : $this
Parameters
$code : string
$amount : 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

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

collectShippingRates()

Collecting shipping rates by address

public collectShippingRates() : $this
Return values
$this

collectTotals()

Collect address totals

public collectTotals() : $this
Return values
$this

collectWeight()

public collectWeight() : static
Return values
static

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

explodeStreetAddress()

Create fields street1, street2, etc.

public explodeStreetAddress() : mixed

To be used in controllers for views data

flagDirty()

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

format()

public format(string $type) : string|null
Parameters
$type : string
Return values
string|null

getAddressType()

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

getAllBaseTotalAmounts()

Get all total amount values in base currency

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

getAllTotalAmounts()

Get all total amount values

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

getAppliedRuleIds()

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

getAppliedTaxes()

Retrieve applied taxes

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

getAppliedTaxesReset()

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

getBaseCustbalanceAmount()

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

getBaseDiscountAmount()

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

getBaseExtraTaxAmount()

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

getBaseGrandTotal()

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

getBaseHiddenTaxAmount()

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

getBaseRowTotal()

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

getBaseShippingAmount()

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

getBaseShippingAmountForDiscount()

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

getBaseShippingDiscountAmount()

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

getBaseShippingHiddenTaxAmount()

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

getBaseShippingInclTax()

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

getBaseShippingTaxable()

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

getBaseShippingTaxAmount()

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

getBaseSubtotal()

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

getBaseSubtotalInclTax()

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

getBaseSubtotalTotalInclTax()

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

getBaseSubtotalWithDiscount()

Get subtotal amount with applied discount in base currency

public getBaseSubtotalWithDiscount() : float
Return values
float

getBaseTaxAmount()

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

getBaseTotalAmount()

Get total amount value by code in base store curncy

public getBaseTotalAmount(string $code) : float
Parameters
$code : string
Return values
float

getBaseVirtualAmount()

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

getBaseWeeeDiscount()

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

getCartFixedRules()

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

getChildren()

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

getCity()

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

getCollectShippingRates()

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

getCompany()

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

getCountry()

public getCountry() : string
Return values
string

getCountryId()

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

getCouponCode()

public getCouponCode() : string
Return values
string

getCreatedAt()

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

getCustbalanceAmount()

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

getCustomerAddressId()

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

getCustomerId()

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

getCustomerNotes()

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

getCustomerPassword()

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

getDiscountAmount()

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

getDiscountDescription()

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

getDiscountDescriptionArray()

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

getDiscountTaxCompensation()

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

getDob()

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

getEmail()

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

getEntityId()

public getEntityId() : int
Return values
int

getExtraTaxAmount()

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

getFax()

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

getFirstname()

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

getForceProcess()

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

getFormated()

public getFormated([bool $html = false ]) : string
Parameters
$html : bool = false
Return values
string

getFormatErrors()

Check the postcode format of the country, and that the region belongs to the country.

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

getFreeMethodWeight()

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

getFreeShipping()

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

getGender()

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

getGiftMessageId()

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

getGrandTotal()

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

getGroupedAllShippingRates()

Retrieve all grouped shipping rates

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

getHasChildren()

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

getIsCustomerSaveTransaction()

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

getIsDefaultBilling()

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

getIsDefaultShipping()

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

getIsPrimaryBilling()

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

getIsPrimaryShipping()

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

getIsShippingInclTax()

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

getItemQty()

Retrieve item quantity by id

public getItemQty([int $itemId = 0 ]) : float|int
Parameters
$itemId : int = 0
Return values
float|int

getLastname()

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

getLimitCarrier()

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

getMiddlename()

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

getName()

Get full customer name

public getName() : string
Return values
string

getOrigData()

Get object loaded data (original data)

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

getParentId()

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

getParentItemId()

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

getPostcode()

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

getPrefix()

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

getQty()

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

getQuoteId()

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

getRegion()

Retrieve region name

public getRegion() : string
Return values
string

getRegionCode()

Return 2 letter state code if available, otherwise full region name

public getRegionCode() : mixed

getRegionId()

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

getResourceName()

Retrieve model resource name

public getResourceName() : string
Return values
string

getRoundingDeltas()

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

getRowTotal()

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

getSameAsBilling()

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

getSaveInAddressBook()

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

getShippingAmount()

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

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

getShippingAmountForDiscount()

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

getShippingDescription()

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

getShippingDiscountAmount()

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

getShippingDiscountPercent()

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

getShippingHiddenTaxAmount()

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

getShippingInclTax()

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

getShippingMethod()

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

getShippingTaxable()

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

getShippingTaxAmount()

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

getShouldIgnoreValidation()

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

getStoreId()

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

getStreet()

get address street

public getStreet([int $line = 0 ]) : string|array<string|int, mixed>
Parameters
$line : int = 0

address line index

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

getStreet1()

public getStreet1() : string
Return values
string

getStreet2()

public getStreet2() : string
Return values
string

getStreet3()

public getStreet3() : string
Return values
string

getStreet4()

public getStreet4() : string
Return values
string

getStreetFull()

public getStreetFull() : string
Return values
string

getSubtotal()

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

getSubtotalInclTax()

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

getSubtotalWithDiscount()

Get subtotal amount with applied discount

public getSubtotalWithDiscount() : float
Return values
float

getSuffix()

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

getTaxAmount()

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

getTaxvat()

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

getTelephone()

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

getTotalAmount()

Get total amount value by code

public getTotalAmount(string $code) : float
Parameters
$code : string
Return values
float

getTotalModels()

Retrieve total models

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

getTotalQty()

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

getUpdatedAt()

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

getVatId()

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

getVatIsValid()

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

getVatRequestDate()

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

getVatRequestId()

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

getVatRequestSuccess()

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

getWeeeDiscount()

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

getWeight()

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

hasCouponCode()

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

hasItems()

Check Quote address has Items

public hasItems() : bool
Return values
bool

hasPaymentMethod()

public hasPaymentMethod() : bool
Return values
bool

implodeStreetAddress()

To be used when processing _POST

public implodeStreetAddress() : mixed

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

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

removeAllShippingRates()

Mark all shipping rates as deleted

public removeAllShippingRates() : $this
Return values
$this

removeItem()

Remove item from collection

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

sanitizeText()

Remove the HTML tags from the text fields, and cut each field to its maximum length.

public sanitizeText() : static
Return values
static

save()

Save object data

public save() : $this
Tags
throws
Throwable
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

setAddressType()

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

setAppliedTaxes()

Set applied taxes

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

setAppliedTaxesReset()

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

setBaseCustbalanceAmount()

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

setBaseExtraTaxAmount()

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

setBaseGrandTotal()

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

setBaseShippingAmount()

Set base shipping amount

public setBaseShippingAmount(float $value[, bool $alreadyExclTax = false ]) : $this
Parameters
$value : float
$alreadyExclTax : bool = false
Return values
$this

setBaseShippingAmountForDiscount()

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

setBaseShippingDiscountAmount()

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

setBaseShippingHiddenTaxAmount()

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

setBaseShippingInclTax()

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

setBaseShippingTaxable()

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

setBaseShippingTaxAmount()

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

setBaseSubtotalInclTax()

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

setBaseSubtotalTotalInclTax()

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

setBaseTaxAmount()

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

setBaseTotalAmount()

Set total amount value in base store currency

public setBaseTotalAmount(string $code, float $amount) : $this
Parameters
$code : string
$amount : float
Return values
$this

setBaseVirtualAmount()

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

setBaseWeeeDiscount()

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

setCartFixedRules()

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

setCity()

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

setCollectShippingRates()

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

setCompany()

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

setCountryId()

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

setCouponCode()

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

setCreatedAt()

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

setCustbalanceAmount()

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

setCustomerAddressId()

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

setCustomerNotes()

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

setDeleteImmediately()

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

setDiscountAmount()

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

setDiscountDescription()

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

setDiscountDescriptionArray()

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

setEmail()

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

setExtraTaxAmount()

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

setFax()

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

setFirstname()

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

setForceProcess()

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

setFreeMethodWeight()

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

setFreeShipping()

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

setGiftMessageId()

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

setGrandTotal()

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

setIsCustomerSaveTransaction()

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

setIsDefaultBilling()

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

setIsDefaultShipping()

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

setIsPrimaryBilling()

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

setIsPrimaryShipping()

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

setIsShippingInclTax()

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

setItemQty()

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

setLastname()

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

setMiddlename()

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

setParentId()

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

setPaymentMethod()

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

setPostcode()

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

setPrefix()

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

setPrevQuoteCustomerGroupId()

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

setQuoteId()

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

setRegion()

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

setRegionId()

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

setRoundingDeltas()

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

setRowWeight()

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

setSameAsBilling()

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

setSaveInAddressBook()

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

setShippingAmount()

Set shipping amount

public setShippingAmount(float $value[, bool $alreadyExclTax = false ]) : $this
Parameters
$value : float
$alreadyExclTax : bool = false
Return values
$this

setShippingAmountForDiscount()

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

setShippingDescription()

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

setShippingDiscountAmount()

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

setShippingDiscountPercent()

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

setShippingHiddenTaxAmount()

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

setShippingInclTax()

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

setShippingMethod()

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

setShippingTaxable()

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

setShippingTaxAmount()

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

setStoreId()

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

setStreet()

set address street

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

setSubtotal()

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

setSubtotalInclTax()

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

setSuffix()

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

setTaxAmount()

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

setTelephone()

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

setTotalAmount()

Set total amount value

public setTotalAmount(string $code, float $amount) : $this
Parameters
$code : string
$amount : float
Return values
$this

setTotalQty()

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

setUpdatedAt()

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

setVirtualAmount()

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

setWeeeDiscount()

public setWeeeDiscount(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 object 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

unsAddressId()

public unsAddressId() : $this
Return values
$this

unsAddressType()

public unsAddressType() : $this
Return values
$this

unsBaseSubtotalInclTax()

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

unsRegion()

public unsRegion() : $this
Return values
$this

unsSubtotalInclTax()

public unsSubtotalInclTax() : $this
Return values
$this

validate()

Validate address attribute values

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

validateMinimumAmount()

Validate minimum amount

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

Processing object after load data

protected _afterLoad() : $this
Return values
$this

_afterSave()

Save child collections

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

_basicCheck()

Perform basic validation

protected _basicCheck() : mixed

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

Initialize Quote identifier before save

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

_clearReferences()

Clearing cyclic references

protected _clearReferences() : $this
Return values
$this

_construct()

Initialize resource

protected _construct() : void
Attributes
#[Override]

_getData()

Get value from _data array without parse key

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

_getErrors()

Retrieve errors

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

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

_isDefaultShippingNullOrSameAsBillingAddress()

Returns true if the def billing address is same as customer address

protected _isDefaultShippingNullOrSameAsBillingAddress() : bool
Return values
bool

_isNotRegisteredCustomer()

Checks if the user is a registered customer

protected _isNotRegisteredCustomer() : bool
Return values
bool

_isSameAsBilling()

Returns true if the billing address is same as the shipping

protected _isSameAsBilling() : bool
Return values
bool

_populateBeforeSaveData()

Set the required fields

protected _populateBeforeSaveData() : mixed

_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

_resetErrors()

Reset errors array

protected _resetErrors() : $this
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

_sortRates()

Sort rates recursive callback

protected _sortRates(array<string|int, mixed> $a, array<string|int, mixed> $b) : int
Parameters
$a : array<string|int, mixed>
$b : array<string|int, mixed>
Return values
int

_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