Documentation

Mage_Sales_Model_Order extends Mage_Sales_Model_Abstract
in package

Order model

Supported events: sales_order_load_after sales_order_save_before sales_order_save_after sales_order_delete_before sales_order_delete_after

Table of Contents

Constants

ACTION_FLAG_CANCEL  : mixed = 'cancel'
Order flags
ACTION_FLAG_COMMENT  : mixed = 'comment'
ACTION_FLAG_CREDITMEMO  : mixed = 'creditmemo'
ACTION_FLAG_EDIT  : mixed = 'edit'
ACTION_FLAG_HOLD  : mixed = 'hold'
ACTION_FLAG_INVOICE  : mixed = 'invoice'
ACTION_FLAG_PRODUCTS_PERMISSION_DENIED  : mixed = 'product_permission_denied'
ACTION_FLAG_REORDER  : mixed = 'reorder'
ACTION_FLAG_SHIP  : mixed = 'ship'
ACTION_FLAG_UNHOLD  : mixed = 'unhold'
EMAIL_EVENT_NAME_NEW_ORDER  : mixed = 'new_order'
Event type names for order emails
EMAIL_EVENT_NAME_UPDATE_ORDER  : mixed = 'update_order'
ENTITY  : mixed = 'order'
Identifier for history item
HISTORY_ENTITY_NAME  : mixed = 'order'
Identifier for history item
REPORT_DATE_TYPE_CREATED  : mixed = 'created'
Report date types
REPORT_DATE_TYPE_UPDATED  : mixed = 'updated'
STATE_CANCELED  : mixed = 'canceled'
STATE_CLOSED  : mixed = 'closed'
STATE_COMPLETE  : mixed = 'complete'
STATE_HOLDED  : mixed = 'holded'
STATE_NEW  : mixed = 'new'
Order states
STATE_PAYMENT_REVIEW  : mixed = 'payment_review'
STATE_PENDING_PAYMENT  : mixed = 'pending_payment'
STATE_PROCESSING  : mixed = 'processing'
STATUS_FRAUD  : mixed = 'fraud'
Order statuses
XML_PATH_EMAIL_COPY_METHOD  : mixed = 'sales_email/order/copy_method'
XML_PATH_EMAIL_COPY_TO  : mixed = 'sales_email/order/copy_to'
XML_PATH_EMAIL_ENABLED  : mixed = 'sales_email/order/enabled'
XML_PATH_EMAIL_GUEST_TEMPLATE  : mixed = 'sales_email/order/guest_template'
XML_PATH_EMAIL_IDENTITY  : mixed = 'sales_email/order/identity'
XML_PATH_EMAIL_TEMPLATE  : mixed = 'sales_email/order/template'
XML configuration paths
XML_PATH_UPDATE_EMAIL_COPY_METHOD  : mixed = 'sales_email/order_comment/copy_method'
XML_PATH_UPDATE_EMAIL_COPY_TO  : mixed = 'sales_email/order_comment/copy_to'
XML_PATH_UPDATE_EMAIL_ENABLED  : mixed = 'sales_email/order_comment/enabled'
XML_PATH_UPDATE_EMAIL_GUEST_TEMPLATE  : mixed = 'sales_email/order_comment/guest_template'
XML_PATH_UPDATE_EMAIL_IDENTITY  : mixed = 'sales_email/order_comment/identity'
XML_PATH_UPDATE_EMAIL_TEMPLATE  : mixed = 'sales_email/order_comment/template'

Properties

$_actionFlag  : array<string|int, mixed>
Array of action flags for canUnhold, canEdit, etc.
$_addresses  : Mage_Sales_Model_Resource_Order_Address_Collection|array<string|int, Mage_Sales_Model_Order_Address>|null
$_baseCurrency  : mixed
$_cacheTag  : string|bool|array<string|int, mixed>
Model cache tag for clear cache in after save and after delete
$_canSendNewEmailFlag  : bool
Flag: if after order placing we can send new email to the customer.
$_creditmemos  : Mage_Sales_Model_Resource_Order_Creditmemo_Collection|array<string|int, Mage_Sales_Model_Order_Creditmemo>|false|null
$_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>
$_eventObject  : mixed
$_eventPrefix  : mixed
$_hasDataChanges  : bool
Data changes flag (true after setData|unsetData call)
$_historyEntityName  : string
Identifier for history item
$_idFieldName  : string
Name of object id field
$_invoices  : Mage_Sales_Model_Resource_Order_Invoice_Collection|null
$_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_Order_Item_Collection|array<string|int, Mage_Sales_Model_Order_Item>|null
$_oldFieldsMap  : array<string|int, mixed>
Map short fields names to its full names
$_orderCurrency  : mixed
$_origData  : array<string|int, mixed>|null
Original data that was loaded
$_payments  : Mage_Sales_Model_Resource_Order_Payment_Collection|array<string|int, Mage_Sales_Model_Order_Payment>|null
$_relatedObjects  : mixed
$_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
$_shipments  : Mage_Sales_Model_Resource_Order_Shipment_Collection|false|null
$_statusHistory  : Mage_Sales_Model_Resource_Order_Status_History_Collection|array<string|int, Mage_Sales_Model_Order_Status_History>|null
$_syncFieldsMap  : mixed
Map of fields to sync to other fields upon changing their data
$_tracks  : Mage_Sales_Model_Resource_Order_Shipment_Track_Collection|null
$_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_Order
Get resource instance
addAddress()  : $this
addData()  : $this
Add data to the object.
addItem()  : $this
addPayment()  : $this
addRelatedObject()  : $this
Add New object to related array
addStatusHistory()  : $this
Set the order status history object and the order object to each other Adds the object to the status history collection, which is automatically saved when the order is saved.
addStatusHistoryComment()  : Mage_Sales_Model_Order_Status_History
Add a comment to order Different or default status may be specified
afterCommitCallback()  : Mage_Core_Model_Abstract
Processing object after save data Updates relevant grid table records.
afterLoad()  : $this
Object after load processing. Implemented as public interface for supporting objects after load in collections
canCancel()  : bool
Retrieve order cancel availability
cancel()  : $this
Cancel order
canComment()  : bool
Check if comment can be added to order history
canCreditmemo()  : bool
Retrieve order credit memo (refund) availability
canEdit()  : bool
Retrieve order edit availability
canFetchPaymentReviewUpdate()  : bool
Check whether there can be a transaction update fetched for payment in review state
canHold()  : bool
Retrieve order hold availability
canInvoice()  : bool
Retrieve order invoice availability
canReorder()  : bool
Retrieve order reorder availability
canReorderIgnoreSalable()  : bool
Check the ability to reorder ignoring the availability in stock or status of the ordered products
canReviewPayment()  : bool
Check whether payment can be accepted or denied
canShip()  : bool
Retrieve order shipment availability
canUnhold()  : bool
Retrieve order unhold availability
canVoidPayment()  : bool
Getter whether the payment can be voided
cleanModelCache()  : $this
Remove model object related cache
clearInstance()  : $this
Clearing object for correct deleting by garbage collector
dataHasChangedFor()  : bool
Compare object data with original data
debug()  : string|array<string|int, mixed>
Present object data as string in debug mode
delete()  : $this
Delete object from database
flagDirty()  : $this
formatBasePrice()  : string
formatBasePricePrecision()  : string
formatPrice()  : string
Get formatted price value including order currency rate to order website currency
formatPricePrecision()  : string
formatPriceTxt()  : string
Retrieve currency formatted string.
getActionFlag()  : bool|null
Retrieve can flag for action (edit, unhold, etc..)
getAddressById()  : false|Mage_Sales_Model_Order_Address
getAddressesCollection()  : Mage_Sales_Model_Resource_Order_Address_Collection
getAdjustmentNegative()  : float|null
getAdjustmentPositive()  : float|null
getAllItems()  : array<string|int, Mage_Sales_Model_Order_Item>
getAllPayments()  : array<string|int, Mage_Sales_Model_Order_Payment>
getAllStatusHistory()  : array<string|int, Mage_Sales_Model_Order_Status_History>
Return collection of order status history items.
getAllVisibleItems()  : array<string|int, mixed>
getAppliedRuleIds()  : string|null
getAppliedTaxes()  : array<string|int, mixed>|null
getAppliedTaxIsSaved()  : bool|null
getBackUrl()  : string|null
getBaseAdjustmentNegative()  : float|null
getBaseAdjustmentPositive()  : float|null
getBaseCurrency()  : Mage_Directory_Model_Currency
Retrieve order website currency for working with base prices
getBaseCurrencyCode()  : string|null
getBaseDiscountAmount()  : float|null
getBaseDiscountCanceled()  : float|null
getBaseDiscountInvoiced()  : float|null
getBaseDiscountRefunded()  : float|null
getBaseGrandTotal()  : float|null
getBaseHiddenTaxAmount()  : float|null
getBaseHiddenTaxInvoiced()  : float|null
getBaseHiddenTaxRefunded()  : float|null
getBaseShippingAmount()  : float|null
getBaseShippingCanceled()  : float|null
getBaseShippingDiscountAmount()  : float|null
getBaseShippingHiddenTaxAmount()  : float|null
getBaseShippingHiddenTaxInvoiced()  : float|null
getBaseShippingHiddenTaxRefunded()  : float|null
getBaseShippingInclTax()  : float|null
getBaseShippingInvoiced()  : float|null
getBaseShippingRefunded()  : float|null
getBaseShippingTaxAmount()  : float|null
getBaseShippingTaxInvoiced()  : float|null
getBaseShippingTaxRefunded()  : float|null
getBaseSubtotal()  : float|null
getBaseSubtotalCanceled()  : float|null
getBaseSubtotalInclTax()  : float|null
getBaseSubtotalInvoiced()  : float|null
getBaseSubtotalRefunded()  : float|null
getBaseTaxAmount()  : float|null
getBaseTaxCanceled()  : float|null
getBaseTaxInvoiced()  : float|null
getBaseTaxRefunded()  : float|null
getBaseToGlobalRate()  : float|null
getBaseToOrderRate()  : float|null
getBaseTotalCanceled()  : float|null
getBaseTotalDue()  : float
Retrieve order total due value
getBaseTotalInvoiced()  : float|null
getBaseTotalInvoicedCost()  : float|null
getBaseTotalOfflineRefunded()  : float|null
getBaseTotalOnlineRefunded()  : float|null
getBaseTotalPaid()  : float|null
getBaseTotalQtyOrdered()  : float|null
getBaseTotalRefunded()  : float|null
getBillingAddress()  : Mage_Sales_Model_Order_Address|null
Retrieve order billing address
getBillingAddressId()  : int|null
getBillingFirstname()  : string|null
getBillingLastname()  : string|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.
getCanReturnToStock()  : bool|null
getCanSendNewEmailFlag()  : bool
Return flag for order if it can sends new email to customer.
getCanShipPartially()  : bool|null
getCanShipPartiallyItem()  : bool|null
getCollection()  : Mage_Sales_Model_Resource_Order_Collection
getConfig()  : Mage_Sales_Model_Order_Config
Retrieve order configuration model
getConvertingFromQuote()  : bool|null
getCouponCode()  : string|null
getCreatedAt()  : string|null
getCreatedAtDate()  : DateTimeImmutable
Get object created at date affected current active store timezone
getCreatedAtFormated()  : string
Get formatted order created date in store timezone
getCreatedAtStoreDate()  : DateTimeImmutable
Get object created at date affected with object store timezone
getCreditmemosCollection()  : Mage_Sales_Model_Resource_Order_Creditmemo_Collection|array<string|int, Mage_Sales_Model_Order_Creditmemo>|false
Retrieve order creditmemos collection
getCurrentCustomerEmail()  : string
Get the current customer email.
getCustomer()  : Mage_Customer_Model_Customer|null
getCustomerDob()  : string|null
getCustomerEmail()  : string|null
getCustomerFirstname()  : string|null
getCustomerGender()  : int|null
getCustomerGroupId()  : int|null
getCustomerId()  : int|null
getCustomerIsGuest()  : bool|null
getCustomerLastname()  : string|null
getCustomerMiddlename()  : string|null
getCustomerName()  : string
Retrieve customer name
getCustomerNote()  : string|null
getCustomerNoteNotify()  : bool|null
getCustomerPrefix()  : string|null
getCustomerSuffix()  : string|null
getCustomerTaxvat()  : string|null
getData()  : float|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
getDiscountCanceled()  : float|null
getDiscountDescription()  : string|null
getDiscountInvoiced()  : float|null
getDiscountRefunded()  : float|null
getEditIncrement()  : int|null
getEmailCustomerNote()  : string
getEmailSent()  : bool|null
getEntityId()  : int
getExtCustomerId()  : string|null
getExtOrderId()  : string|null
getForcedCanCreditmemo()  : bool|null
getForcedDoShipmentWithInvoice()  : int|null
getForceUpdateGridRecords()  : bool|null
getFullTaxInfo()  : mixed
getGiftMessageId()  : int|null
getGlobalCurrencyCode()  : string|null
getGrandTotal()  : float|null
getHiddenTaxAmount()  : float|null
getHiddenTaxInvoiced()  : float|null
getHiddenTaxRefunded()  : float|null
getHoldBeforeState()  : string|null
getHoldBeforeStatus()  : string|null
getId()  : int|string|null
Retrieve model object identifier
getIdFieldName()  : string
Retrieve identifier field name for model
getIncrementId()  : string|null
getInvoiceCollection()  : Mage_Sales_Model_Resource_Order_Invoice_Collection
Retrieve order invoices collection
getInvoicesCollection()  : Mage_Sales_Model_Resource_Order_Invoice_Collection
Retrieve order invoices collection
getIsInProcess()  : bool|null
getIsMultiPayment()  : bool|null
getIsNotVirtual()  : bool
getIsVirtual()  : bool|null
getItemById()  : Mage_Sales_Model_Order_Item|null
getItemByQuoteItemId()  : Mage_Sales_Model_Order_Item|null
getItemsCollection()  : Mage_Sales_Model_Resource_Order_Item_Collection
getItemsRandomCollection()  : Mage_Sales_Model_Resource_Order_Item_Collection
Get random items collection with related children
getOrderCurrency()  : Mage_Directory_Model_Currency
Get currency model instance. Will be used currency with which order placed
getOrderCurrencyCode()  : string|null
getOrigData()  : mixed
Get object loaded data (original data)
getOriginalIncrementId()  : string|null
getParentItemsRandomCollection()  : Mage_Sales_Model_Resource_Order_Item_Collection
Get random items collection without related children
getPayment()  : Mage_Sales_Model_Order_Payment|false
Retrieve order payment model object
getPaymentAuthorizationAmount()  : float|null
getPaymentAuthorizationExpiration()  : int|null
getPaymentById()  : bool|Mage_Sales_Model_Order_Payment
getPaymentsCollection()  : Mage_Sales_Model_Resource_Order_Payment_Collection
getPaypalIpnCustomerNotified()  : int|null
getProtectCode()  : string|null
getQuantity()  : float|null
getQuote()  : Mage_Sales_Model_Quote|null
getQuoteAddressId()  : int|null
getQuoteBaseGrandTotal()  : float|null
getQuoteId()  : int|null
getRealOrderId()  : string
getRelatedObjects()  : array<string|int, mixed>
Retrieve array of related objects
getRelationChildId()  : string|null
getRelationChildRealId()  : string|null
getRelationParentId()  : string|null
getRelationParentRealId()  : string|null
getRemoteIp()  : string|null
getReordered()  : bool|null
getResource()  : Mage_Sales_Model_Resource_Order
Retrieve model resource
getResourceCollection()  : Mage_Core_Model_Resource_Db_Collection_Abstract
Get collection instance
getResourceName()  : string
Retrieve model resource name
getRevenue()  : float|null
getRowTaxDisplayPrecision()  : int|null
getShipmentsCollection()  : Mage_Sales_Model_Resource_Order_Shipment_Collection|false
Retrieve order shipments collection
getShipping()  : float|null
getShippingAddress()  : Mage_Sales_Model_Order_Address|null
Retrieve order shipping address
getShippingAddressId()  : int|null
getShippingAmount()  : float|null
getShippingCanceled()  : float|null
getShippingCarrier()  : Mage_Shipping_Model_Carrier_Abstract
Return model of shipping carrier
getShippingDescription()  : string|null
getShippingDiscountAmount()  : float|null
getShippingHiddenTaxAmount()  : float|null
getShippingHiddenTaxInvoiced()  : float|null
getShippingHiddenTaxRefunded()  : float|null
getShippingInclTax()  : float|null
getShippingInvoiced()  : float|null
getShippingMethod()  : string|DataObject
Retrieve shipping method
getShippingRefunded()  : float|null
getShippingTaxAmount()  : float|null
getShippingTaxInvoiced()  : float|null
getShippingTaxRefunded()  : float|null
getState()  : string|null
getStatus()  : string|null
getStatusHistoryById()  : false|Mage_Sales_Model_Order_Status_History
getStatusHistoryCollection()  : Mage_Sales_Model_Resource_Order_Status_History_Collection
getStatusLabel()  : string
Retrieve label of order status
getStore()  : Mage_Core_Model_Store
Retrieve store model instance
getStoreCurrencyCode()  : string|null
getStoreGroupName()  : string|null
getStoreId()  : int|null
getStoreName()  : string|null
getStoreToBaseRate()  : float|null
getStoreToOrderRate()  : float|null
getSubtotal()  : float|null
getSubtotalCanceled()  : float|null
getSubtotalInclTax()  : float|null
getSubtotalInvoiced()  : float|null
getSubtotalRefunded()  : float|null
getTax()  : float|null
getTaxAmount()  : float|null
getTaxCanceled()  : float|null
getTaxInvoiced()  : float|null
getTaxRefunded()  : float|null
getTotalCanceled()  : float|null
getTotalDue()  : float
Retrieve order total due value
getTotalInvoiced()  : float|null
getTotalItemCount()  : int|null
getTotalOfflineRefunded()  : float|null
getTotalOnlineRefunded()  : float|null
getTotalPaid()  : float|null
getTotalQtyOrdered()  : float|null
getTotalRefunded()  : float|null
getTrackingNumbers()  : array<string|int, mixed>
Retrieve tracking numbers
getTracksCollection()  : Mage_Sales_Model_Resource_Order_Shipment_Track_Collection
Retrieve order tracking numbers collection
getUpdatedAt()  : string|null
getVisibleStatusHistory()  : array<string|int, mixed>
Return collection of visible on frontend order status history items.
getWeight()  : float|null
getXForwardedFor()  : string|null
hasBillingAddressId()  : bool
hasCanReturnToStock()  : bool
hasCreditmemos()  : bool
Check order creditmemos availability
hasCustomerNoteNotify()  : 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
hasForcedCanCreditmemo()  : bool
hasInvoices()  : int
Check order invoices availability
hasShipments()  : bool
Check order shipments availability
hasShippingAddressId()  : bool
hold()  : $this
isCanceled()  : bool
Check whether order is canceled
isCurrencyDifferent()  : bool
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 the order 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
isPaymentReview()  : bool
Check whether the payment is in payment review state In this state order cannot be normally processed. Possible actions can be: - accept or deny payment - fetch transaction information
isStateProtected()  : bool
Whether specified state can be set from outside
isStatusValidForState()  : bool
Whether the status is assigned to the given state (defaults to the order's current state)
jsonSerialize()  : array<string|int, mixed>
Implementation of JsonSerializable::jsonSerialize()
load()  : $this
Load object data
loadByAttribute()  : $this
Load order by custom attribute value. Attribute value should be unique
loadByIncrementId()  : $this
Load order by system increment identifier
offsetExists()  : bool
Implementation of ArrayAccess::offsetExists()
offsetGet()  : mixed
Implementation of ArrayAccess::offsetGet()
offsetSet()  : void
Implementation of ArrayAccess::offsetSet()
offsetUnset()  : void
Implementation of ArrayAccess::offsetUnset()
place()  : $this
Place order
prepareInvoice()  : Mage_Sales_Model_Order_Invoice
Create new invoice with maximum qty for invoice for each item
prepareShipment()  : Mage_Sales_Model_Order_Shipment
Create new shipment with maximum qty for shipping for each item
queueNewOrderEmail()  : $this
Queue email with new order data
queueOrderUpdateEmail()  : $this
Queue email with order update information
registerCancellation()  : $this
Prepare order totals to cancellation
reset()  : $this
Resets all data in object so after another load it will be complete new object
save()  : $this
Save object data
sendNewOrderEmail()  : $this
Send email with order data
sendOrderUpdateEmail()  : $this
Send email with order update information
serialize()  : string
serialize object attributes
setActionFlag()  : $this
Set can flag value for action (edit, unhold, etc...)
setAdjustmentNegative()  : static
setAdjustmentPositive()  : static
setAppliedRuleIds()  : static
setAppliedTaxes()  : static
setAppliedTaxIsSaved()  : static
setAttribute()  : $this
setBaseAdjustmentNegative()  : static
setBaseAdjustmentPositive()  : static
setBaseCurrencyCode()  : static
setBaseDiscountAmount()  : static
setBaseDiscountCanceled()  : static
setBaseDiscountInvoiced()  : static
setBaseDiscountRefunded()  : static
setBaseGrandTotal()  : static
setBaseHiddenTaxAmount()  : static
setBaseHiddenTaxInvoiced()  : static
setBaseHiddenTaxRefunded()  : static
setBaseShippingAmount()  : static
setBaseShippingCanceled()  : static
setBaseShippingDiscountAmount()  : static
setBaseShippingHiddenTaxAmount()  : static
setBaseShippingInclTax()  : static
setBaseShippingInvoiced()  : static
setBaseShippingRefunded()  : static
setBaseShippingTaxAmount()  : static
setBaseShippingTaxInvoiced()  : static
setBaseShippingTaxRefunded()  : static
setBaseSubtotal()  : static
setBaseSubtotalCanceled()  : static
setBaseSubtotalInclTax()  : static
setBaseSubtotalInvoiced()  : static
setBaseSubtotalRefunded()  : static
setBaseTaxAmount()  : static
setBaseTaxCanceled()  : static
setBaseTaxInvoiced()  : static
setBaseTaxRefunded()  : static
setBaseToGlobalRate()  : static
setBaseToOrderRate()  : static
setBaseTotalCanceled()  : static
setBaseTotalDue()  : static
setBaseTotalInvoiced()  : static
setBaseTotalInvoicedCost()  : static
setBaseTotalOfflineRefunded()  : static
setBaseTotalOnlineRefunded()  : static
setBaseTotalPaid()  : static
setBaseTotalQtyOrdered()  : static
setBaseTotalRefunded()  : static
setBillingAddress()  : $this
Declare order billing address
setBillingAddressId()  : static
setCanReturnToStock()  : static
setCanSendNewEmailFlag()  : $this
Set flag for order if it can sends new email to customer.
setCanShipPartially()  : static
setCanShipPartiallyItem()  : static
setConvertingFromQuote()  : static
setCouponCode()  : static
setCouponRuleName()  : static
setCreatedAt()  : static
setCustomer()  : static
setCustomerDob()  : static
setCustomerEmail()  : static
setCustomerFirstname()  : static
setCustomerGender()  : static
setCustomerGroupId()  : static
setCustomerId()  : static
setCustomerIsGuest()  : static
setCustomerLastname()  : static
setCustomerMiddlename()  : static
setCustomerNote()  : static
setCustomerNoteNotify()  : static
setCustomerPrefix()  : static
setCustomerSuffix()  : 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
setDiscountAmount()  : static
setDiscountCanceled()  : static
setDiscountDescription()  : static
setDiscountInvoiced()  : static
setDiscountRefunded()  : static
setEditIncrement()  : static
setEmailSent()  : static
setExtCustomerId()  : static
setExtOrderId()  : static
setForcedCanCreditmemo()  : static
setForcedDoShipmentWithInvoice()  : static
setGiftMessage()  : static
setGiftMessageId()  : static
setGlobalCurrencyCode()  : static
setGrandTotal()  : static
setHiddenTaxAmount()  : static
setHiddenTaxInvoiced()  : static
setHiddenTaxRefunded()  : static
setHistoryEntityName()  : $this
Overrides entity id, which will be saved to comments history status
setHoldBeforeState()  : static
setHoldBeforeStatus()  : static
setId()  : $this
Declare model object identifier value
setIdFieldName()  : $this
set name of object id field
setIncrementId()  : static
setIsInProcess()  : static
setIsVirtual()  : static
setOrderCurrencyCode()  : static
setOrigData()  : $this
Initialize object original data
setOriginalIncrementId()  : static
setPayment()  : Mage_Sales_Model_Order_Payment
setPaymentAuthorizationAmount()  : static
setPaymentAuthorizationExpiration()  : static
setPaypalIpnCustomerNotified()  : static
setProtectCode()  : static
setQuote()  : static
setQuoteAddressId()  : static
setQuoteId()  : static
setRelationChildId()  : static
setRelationChildRealId()  : static
setRelationParentId()  : static
setRelationParentRealId()  : static
setRemoteIp()  : static
setShippingAddress()  : $this
Declare order shipping address
setShippingAddressId()  : static
setShippingAmount()  : static
setShippingCanceled()  : static
setShippingDescription()  : static
setShippingDiscountAmount()  : static
setShippingHiddenTaxAmount()  : static
setShippingInclTax()  : static
setShippingInvoiced()  : static
setShippingMethod()  : static
setShippingRefunded()  : static
setShippingTaxAmount()  : static
setShippingTaxInvoiced()  : static
setShippingTaxRefunded()  : static
setState()  : $this
Order state setter.
setStatus()  : static
setStoreCurrencyCode()  : static
setStoreId()  : static
setStoreName()  : static
setStoreToBaseRate()  : static
setStoreToOrderRate()  : static
setSubtotal()  : static
setSubtotalCanceled()  : static
setSubtotalInclTax()  : static
setSubtotalInvoiced()  : static
setSubtotalRefunded()  : static
setTaxAmount()  : static
setTaxCanceled()  : static
setTaxInvoiced()  : static
setTaxRefunded()  : static
setTotalCanceled()  : static
setTotalDue()  : static
setTotalInvoiced()  : static
setTotalItemCount()  : static
setTotalOfflineRefunded()  : static
setTotalOnlineRefunded()  : static
setTotalPaid()  : static
setTotalQtyOrdered()  : static
setTotalRefunded()  : static
setTransactionId()  : static
setUpdatedAt()  : static
setWeight()  : 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
unhold()  : $this
Attempt to unhold the order
unsBillingAddressId()  : $this
unsetData()  : $this
Clear order object data
unsetOldData()  : $this
Unset old fields data from the object.
unsShippingAddressId()  : $this
__toJson()  : string
Convert object attributes to JSON
__toXml()  : string
Convert object attributes to XML
_addFullNames()  : mixed
_addPdfAttachment()  : void
Attach a PDF copy of this document to the given email info, if it has a PDF form
_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 order related objects
_assertStatusValidForState()  : void
_beforeDelete()  : $this
Protect order delete from not admin scope
_beforeLoad()  : $this
Processing object before load data
_beforeSave()  : Mage_Core_Model_Abstract
Processing object before save data
_camelize()  : string
_canReorder()  : bool
Retrieve order reorder availability
_canVoidOrder()  : bool
Check whether order could be canceled by states and flags
_checkState()  : mixed
Check order state before saving
_checkStatus()  : void
Safety net for status writes that bypass setState() and addStatusHistoryComment().
_clearData()  : $this
Clearing object's data
_clearReferences()  : $this
Clearing cyclic references
_construct()  : void
Internal constructor not depended on params. Can be used for object initialization
_getData()  : mixed
Get value from _data array without parse key
_getEmails()  : array<string|int, mixed>|false
_getEventData()  : array<string|int, mixed>
Get array of objects transferred to default events processing
_getItemsRandomCollection()  : Mage_Sales_Model_Resource_Order_Item_Collection
Get random items collection with or without related children
_getPdfAttachmentInfo()  : array{source_model: string, entity_model: string, filename_prefix: string}|null
Descriptor for attaching this document as a PDF to an email, or null when the document has no printable PDF form. Overridden by invoice/shipment/creditmemo.
_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
_placePayment()  : $this
Place order payments
_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
_setResourceModel()  : mixed
Set resource names
_setState()  : $this
Order state protected setter.
_underscore()  : string
Converts field names for setters and getters

Constants

ACTION_FLAG_CANCEL

Order flags

public mixed ACTION_FLAG_CANCEL = 'cancel'

ACTION_FLAG_COMMENT

public mixed ACTION_FLAG_COMMENT = 'comment'

ACTION_FLAG_CREDITMEMO

public mixed ACTION_FLAG_CREDITMEMO = 'creditmemo'

ACTION_FLAG_EDIT

public mixed ACTION_FLAG_EDIT = 'edit'

ACTION_FLAG_HOLD

public mixed ACTION_FLAG_HOLD = 'hold'

ACTION_FLAG_INVOICE

public mixed ACTION_FLAG_INVOICE = 'invoice'

ACTION_FLAG_PRODUCTS_PERMISSION_DENIED

public mixed ACTION_FLAG_PRODUCTS_PERMISSION_DENIED = 'product_permission_denied'

ACTION_FLAG_REORDER

public mixed ACTION_FLAG_REORDER = 'reorder'

ACTION_FLAG_SHIP

public mixed ACTION_FLAG_SHIP = 'ship'

ACTION_FLAG_UNHOLD

public mixed ACTION_FLAG_UNHOLD = 'unhold'

EMAIL_EVENT_NAME_NEW_ORDER

Event type names for order emails

public mixed EMAIL_EVENT_NAME_NEW_ORDER = 'new_order'

EMAIL_EVENT_NAME_UPDATE_ORDER

public mixed EMAIL_EVENT_NAME_UPDATE_ORDER = 'update_order'

ENTITY

Identifier for history item

public mixed ENTITY = 'order'

HISTORY_ENTITY_NAME

Identifier for history item

public mixed HISTORY_ENTITY_NAME = 'order'

REPORT_DATE_TYPE_CREATED

Report date types

public mixed REPORT_DATE_TYPE_CREATED = 'created'

REPORT_DATE_TYPE_UPDATED

public mixed REPORT_DATE_TYPE_UPDATED = 'updated'

STATE_CANCELED

public mixed STATE_CANCELED = 'canceled'

STATE_CLOSED

public mixed STATE_CLOSED = 'closed'

STATE_COMPLETE

public mixed STATE_COMPLETE = 'complete'

STATE_HOLDED

public mixed STATE_HOLDED = 'holded'

STATE_NEW

Order states

public mixed STATE_NEW = 'new'

STATE_PAYMENT_REVIEW

public mixed STATE_PAYMENT_REVIEW = 'payment_review'

STATE_PENDING_PAYMENT

public mixed STATE_PENDING_PAYMENT = 'pending_payment'

STATE_PROCESSING

public mixed STATE_PROCESSING = 'processing'

STATUS_FRAUD

Order statuses

public mixed STATUS_FRAUD = 'fraud'

XML_PATH_EMAIL_COPY_METHOD

public mixed XML_PATH_EMAIL_COPY_METHOD = 'sales_email/order/copy_method'

XML_PATH_EMAIL_COPY_TO

public mixed XML_PATH_EMAIL_COPY_TO = 'sales_email/order/copy_to'

XML_PATH_EMAIL_ENABLED

public mixed XML_PATH_EMAIL_ENABLED = 'sales_email/order/enabled'

XML_PATH_EMAIL_GUEST_TEMPLATE

public mixed XML_PATH_EMAIL_GUEST_TEMPLATE = 'sales_email/order/guest_template'

XML_PATH_EMAIL_IDENTITY

public mixed XML_PATH_EMAIL_IDENTITY = 'sales_email/order/identity'

XML_PATH_EMAIL_TEMPLATE

XML configuration paths

public mixed XML_PATH_EMAIL_TEMPLATE = 'sales_email/order/template'

XML_PATH_UPDATE_EMAIL_COPY_METHOD

public mixed XML_PATH_UPDATE_EMAIL_COPY_METHOD = 'sales_email/order_comment/copy_method'

XML_PATH_UPDATE_EMAIL_COPY_TO

public mixed XML_PATH_UPDATE_EMAIL_COPY_TO = 'sales_email/order_comment/copy_to'

XML_PATH_UPDATE_EMAIL_ENABLED

public mixed XML_PATH_UPDATE_EMAIL_ENABLED = 'sales_email/order_comment/enabled'

XML_PATH_UPDATE_EMAIL_GUEST_TEMPLATE

public mixed XML_PATH_UPDATE_EMAIL_GUEST_TEMPLATE = 'sales_email/order_comment/guest_template'

XML_PATH_UPDATE_EMAIL_IDENTITY

public mixed XML_PATH_UPDATE_EMAIL_IDENTITY = 'sales_email/order_comment/identity'

XML_PATH_UPDATE_EMAIL_TEMPLATE

public mixed XML_PATH_UPDATE_EMAIL_TEMPLATE = 'sales_email/order_comment/template'

Properties

$_actionFlag

Array of action flags for canUnhold, canEdit, etc.

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

$_baseCurrency

protected mixed $_baseCurrency = \null

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

$_canSendNewEmailFlag

Flag: if after order placing we can send new email to the customer.

protected bool $_canSendNewEmailFlag = \true

$_data

Object attributes

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

$_dataSaveAllowed

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

protected bool $_dataSaveAllowed = \true

$_dirty

protected array<string|int, mixed> $_dirty

$_eventObject

protected mixed $_eventObject = 'order'
Attributes
#[Override]

$_eventPrefix

protected mixed $_eventPrefix = 'sales_order'
Attributes
#[Override]

$_hasDataChanges

Data changes flag (true after setData|unsetData call)

protected bool $_hasDataChanges = false

$_historyEntityName

Identifier for history item

protected string $_historyEntityName = self::HISTORY_ENTITY_NAME

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

$_orderCurrency

protected mixed $_orderCurrency = \null

$_origData

Original data that was loaded

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

$_relatedObjects

protected mixed $_relatedObjects = []

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

addStatusHistory()

Set the order status history object and the order object to each other Adds the object to the status history collection, which is automatically saved when the order is saved.

public addStatusHistory(Mage_Sales_Model_Order_Status_History $history) : $this

See the entity_id attribute backend model. Or the history record can be saved standalone after this.

Parameters
$history : Mage_Sales_Model_Order_Status_History
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

canCancel()

Retrieve order cancel availability

public canCancel() : bool
Return values
bool

cancel()

Cancel order

public cancel([string $comment = '' ]) : $this
Parameters
$comment : string = ''
Return values
$this

canComment()

Check if comment can be added to order history

public canComment() : bool
Return values
bool

canCreditmemo()

Retrieve order credit memo (refund) availability

public canCreditmemo() : bool
Return values
bool

canEdit()

Retrieve order edit availability

public canEdit() : bool
Return values
bool

canFetchPaymentReviewUpdate()

Check whether there can be a transaction update fetched for payment in review state

public canFetchPaymentReviewUpdate() : bool
Return values
bool

canHold()

Retrieve order hold availability

public canHold() : bool
Return values
bool

canInvoice()

Retrieve order invoice availability

public canInvoice() : bool
Return values
bool

canReorder()

Retrieve order reorder availability

public canReorder() : bool
Return values
bool

canReorderIgnoreSalable()

Check the ability to reorder ignoring the availability in stock or status of the ordered products

public canReorderIgnoreSalable() : bool
Return values
bool

canReviewPayment()

Check whether payment can be accepted or denied

public canReviewPayment() : bool
Return values
bool

canShip()

Retrieve order shipment availability

public canShip() : bool
Return values
bool

canUnhold()

Retrieve order unhold availability

public canUnhold() : bool
Return values
bool

canVoidPayment()

Getter whether the payment can be voided

public canVoidPayment() : bool
Return values
bool

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

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

formatBasePrice()

public formatBasePrice(float $price) : string
Parameters
$price : float
Return values
string

formatBasePricePrecision()

public formatBasePricePrecision(float $price, int $precision) : string
Parameters
$price : float
$precision : int
Return values
string

formatPrice()

Get formatted price value including order currency rate to order website currency

public formatPrice(float $price[, bool $addBrackets = false ]) : string
Parameters
$price : float
$addBrackets : bool = false
Return values
string

formatPricePrecision()

public formatPricePrecision(float $price, int $precision[, bool $addBrackets = false ]) : string
Parameters
$price : float
$precision : int
$addBrackets : bool = false
Return values
string

formatPriceTxt()

Retrieve currency formatted string.

public formatPriceTxt(float|string $price) : string
Parameters
$price : float|string

Numeric value or field name, e.g. "grand_total".

Return values
string

getActionFlag()

Retrieve can flag for action (edit, unhold, etc..)

public getActionFlag(string $action) : bool|null
Parameters
$action : string
Return values
bool|null

getAdjustmentNegative()

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

getAdjustmentPositive()

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

getAllVisibleItems()

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

getAppliedRuleIds()

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

getAppliedTaxes()

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

getAppliedTaxIsSaved()

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

getBackUrl()

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

getBaseAdjustmentNegative()

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

getBaseAdjustmentPositive()

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

getBaseCurrencyCode()

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

getBaseDiscountAmount()

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

getBaseDiscountCanceled()

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

getBaseDiscountInvoiced()

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

getBaseDiscountRefunded()

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

getBaseGrandTotal()

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

getBaseHiddenTaxAmount()

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

getBaseHiddenTaxInvoiced()

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

getBaseHiddenTaxRefunded()

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

getBaseShippingAmount()

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

getBaseShippingCanceled()

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

getBaseShippingDiscountAmount()

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

getBaseShippingHiddenTaxAmount()

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

getBaseShippingHiddenTaxInvoiced()

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

getBaseShippingHiddenTaxRefunded()

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

getBaseShippingInclTax()

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

getBaseShippingInvoiced()

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

getBaseShippingRefunded()

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

getBaseShippingTaxAmount()

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

getBaseShippingTaxInvoiced()

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

getBaseShippingTaxRefunded()

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

getBaseSubtotal()

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

getBaseSubtotalCanceled()

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

getBaseSubtotalInclTax()

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

getBaseSubtotalInvoiced()

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

getBaseSubtotalRefunded()

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

getBaseTaxAmount()

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

getBaseTaxCanceled()

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

getBaseTaxInvoiced()

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

getBaseTaxRefunded()

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

getBaseToGlobalRate()

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

getBaseToOrderRate()

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

getBaseTotalCanceled()

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

getBaseTotalDue()

Retrieve order total due value

public getBaseTotalDue() : float
Return values
float

getBaseTotalInvoiced()

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

getBaseTotalInvoicedCost()

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

getBaseTotalOfflineRefunded()

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

getBaseTotalOnlineRefunded()

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

getBaseTotalPaid()

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

getBaseTotalQtyOrdered()

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

getBaseTotalRefunded()

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

getBillingAddressId()

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

getBillingFirstname()

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

getBillingLastname()

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

getCanReturnToStock()

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

getCanSendNewEmailFlag()

Return flag for order if it can sends new email to customer.

public getCanSendNewEmailFlag() : bool
Return values
bool

getCanShipPartially()

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

getCanShipPartiallyItem()

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

getConvertingFromQuote()

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

getCouponCode()

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

getCreatedAt()

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

getCreatedAtDate()

Get object created at date affected current active store timezone

public getCreatedAtDate() : DateTimeImmutable
Return values
DateTimeImmutable

getCreatedAtFormated()

Get formatted order created date in store timezone

public getCreatedAtFormated(string $format) : string
Parameters
$format : string

date format type (short|medium|long|full)

Return values
string

getCreatedAtStoreDate()

Get object created at date affected with object store timezone

public getCreatedAtStoreDate() : DateTimeImmutable
Return values
DateTimeImmutable

getCurrentCustomerEmail()

Get the current customer email.

public getCurrentCustomerEmail() : string
Return values
string

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|null
Return values
int|null

getCustomerId()

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

getCustomerIsGuest()

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

getCustomerLastname()

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

getCustomerMiddlename()

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

getCustomerName()

Retrieve customer name

public getCustomerName() : string
Return values
string

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

getCustomerTaxvat()

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

getData()

Object data getter

public getData([string $key = '' ][, int|string|null $index = null ]) : float|mixed
Parameters
$key : string = ''
$index : int|string|null = null
Attributes
#[Override]
Return values
float|mixed

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

getDiscountCanceled()

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

getDiscountDescription()

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

getDiscountInvoiced()

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

getDiscountRefunded()

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

getEditIncrement()

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

getEmailCustomerNote()

public getEmailCustomerNote() : string
Return values
string

getEmailSent()

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

getEntityId()

public getEntityId() : int
Return values
int

getExtCustomerId()

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

getExtOrderId()

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

getForcedCanCreditmemo()

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

getForcedDoShipmentWithInvoice()

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

getForceUpdateGridRecords()

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

getFullTaxInfo()

public getFullTaxInfo() : mixed

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

getHiddenTaxAmount()

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

getHiddenTaxInvoiced()

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

getHiddenTaxRefunded()

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

getHoldBeforeState()

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

getHoldBeforeStatus()

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

getIncrementId()

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

getIsInProcess()

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

getIsMultiPayment()

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

getIsNotVirtual()

public getIsNotVirtual() : bool
Return values
bool

getIsVirtual()

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

getOrderCurrencyCode()

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

getOrigData()

Get object loaded data (original data)

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

getOriginalIncrementId()

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

getPaymentAuthorizationAmount()

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

getPaymentAuthorizationExpiration()

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

getPaypalIpnCustomerNotified()

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

getProtectCode()

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

getQuantity()

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

getQuoteAddressId()

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

getQuoteBaseGrandTotal()

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

getQuoteId()

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

getRealOrderId()

public getRealOrderId() : string
Return values
string

getRelatedObjects()

Retrieve array of related objects

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

Used for order saving

Return values
array<string|int, mixed>

getRelationChildId()

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

getRelationChildRealId()

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

getRelationParentId()

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

getRelationParentRealId()

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

getRemoteIp()

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

getReordered()

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

getResourceName()

Retrieve model resource name

public getResourceName() : string
Return values
string

getRevenue()

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

getRowTaxDisplayPrecision()

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

getShipping()

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

getShippingAddressId()

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

getShippingAmount()

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

getShippingCanceled()

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

getShippingDescription()

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

getShippingDiscountAmount()

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

getShippingHiddenTaxAmount()

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

getShippingHiddenTaxInvoiced()

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

getShippingHiddenTaxRefunded()

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

getShippingInclTax()

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

getShippingInvoiced()

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

getShippingMethod()

Retrieve shipping method

public getShippingMethod([bool $asObject = false ]) : string|DataObject
Parameters
$asObject : bool = false

return carrier code and shipping method data as object

Return values
string|DataObject

getShippingRefunded()

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

getShippingTaxAmount()

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

getShippingTaxInvoiced()

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

getShippingTaxRefunded()

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

getState()

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

getStatus()

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

getStatusLabel()

Retrieve label of order status

public getStatusLabel() : string
Return values
string

getStoreCurrencyCode()

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

getStoreGroupName()

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

getStoreId()

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

getStoreName()

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

getStoreToBaseRate()

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

getStoreToOrderRate()

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

getSubtotal()

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

getSubtotalCanceled()

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

getSubtotalInclTax()

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

getSubtotalInvoiced()

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

getSubtotalRefunded()

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

getTax()

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

getTaxAmount()

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

getTaxCanceled()

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

getTaxInvoiced()

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

getTaxRefunded()

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

getTotalCanceled()

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

getTotalDue()

Retrieve order total due value

public getTotalDue() : float
Return values
float

getTotalInvoiced()

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

getTotalItemCount()

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

getTotalOfflineRefunded()

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

getTotalOnlineRefunded()

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

getTotalPaid()

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

getTotalQtyOrdered()

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

getTotalRefunded()

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

getTrackingNumbers()

Retrieve tracking numbers

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

getUpdatedAt()

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

getVisibleStatusHistory()

Return collection of visible on frontend order status history items.

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

getWeight()

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

getXForwardedFor()

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

hasBillingAddressId()

public hasBillingAddressId() : bool
Return values
bool

hasCanReturnToStock()

public hasCanReturnToStock() : bool
Return values
bool

hasCreditmemos()

Check order creditmemos availability

public hasCreditmemos() : bool
Return values
bool

hasCustomerNoteNotify()

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

hasForcedCanCreditmemo()

public hasForcedCanCreditmemo() : bool
Return values
bool

hasInvoices()

Check order invoices availability

public hasInvoices() : int
Return values
int

hasShipments()

Check order shipments availability

public hasShipments() : bool
Return values
bool

hasShippingAddressId()

public hasShippingAddressId() : bool
Return values
bool

isCanceled()

Check whether order is canceled

public isCanceled() : bool
Return values
bool

isCurrencyDifferent()

public isCurrencyDifferent() : 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 the order 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

isPaymentReview()

Check whether the payment is in payment review state In this state order cannot be normally processed. Possible actions can be: - accept or deny payment - fetch transaction information

public isPaymentReview() : bool
Return values
bool

isStateProtected()

Whether specified state can be set from outside

public isStateProtected(string $state) : bool
Parameters
$state : string
Return values
bool

isStatusValidForState()

Whether the status is assigned to the given state (defaults to the order's current state)

public isStatusValidForState(string $status[, string|null $state = null ]) : bool
Parameters
$status : string
$state : string|null = 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

loadByAttribute()

Load order by custom attribute value. Attribute value should be unique

public loadByAttribute(string $attribute, string $value) : $this
Parameters
$attribute : string
$value : string
Return values
$this

loadByIncrementId()

Load order by system increment identifier

public loadByIncrementId(string $incrementId) : $this
Parameters
$incrementId : string
Return values
$this

place()

Place order

public place() : $this
Return values
$this

queueNewOrderEmail()

Queue email with new order data

public queueNewOrderEmail([bool $forceMode = false ]) : $this
Parameters
$forceMode : bool = false

if true then email will be sent regardless of the fact that it was already sent previously

Tags
throws
Exception
Return values
$this

queueOrderUpdateEmail()

Queue email with order update information

public queueOrderUpdateEmail([bool $notifyCustomer = true ][, string $comment = '' ][, bool $forceMode = false ]) : $this
Parameters
$notifyCustomer : bool = true
$comment : string = ''
$forceMode : bool = false

if true then email will be sent regardless of the fact that it was already sent previously

Return values
$this

registerCancellation()

Prepare order totals to cancellation

public registerCancellation([string $comment = '' ][, bool $graceful = true ]) : $this
Parameters
$comment : string = ''
$graceful : bool = true
Tags
throws
Mage_Core_Exception
Return values
$this

reset()

Resets all data in object so after another load it will be complete new object

public reset() : $this
Return values
$this

save()

Save object data

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

sendNewOrderEmail()

Send email with order data

public sendNewOrderEmail() : $this
Return values
$this

sendOrderUpdateEmail()

Send email with order update information

public sendOrderUpdateEmail([bool $notifyCustomer = true ][, string $comment = '' ]) : $this
Parameters
$notifyCustomer : bool = true
$comment : string = ''
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

setActionFlag()

Set can flag value for action (edit, unhold, etc...)

public setActionFlag(string $action, bool $flag) : $this
Parameters
$action : string
$flag : bool
Return values
$this

setAdjustmentNegative()

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

setAdjustmentPositive()

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

setAppliedRuleIds()

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

setAppliedTaxes()

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

setAppliedTaxIsSaved()

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

setBaseAdjustmentNegative()

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

setBaseAdjustmentPositive()

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

setBaseCurrencyCode()

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

setBaseDiscountAmount()

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

setBaseDiscountCanceled()

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

setBaseDiscountInvoiced()

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

setBaseDiscountRefunded()

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

setBaseHiddenTaxInvoiced()

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

setBaseHiddenTaxRefunded()

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

setBaseShippingAmount()

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

setBaseShippingCanceled()

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

setBaseShippingInvoiced()

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

setBaseShippingRefunded()

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

setBaseShippingTaxInvoiced()

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

setBaseShippingTaxRefunded()

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

setBaseSubtotalCanceled()

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

setBaseSubtotalInvoiced()

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

setBaseSubtotalRefunded()

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

setBaseTaxCanceled()

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

setBaseTaxInvoiced()

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

setBaseTaxRefunded()

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

setBaseToOrderRate()

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

setBaseTotalCanceled()

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

setBaseTotalDue()

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

setBaseTotalInvoiced()

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

setBaseTotalInvoicedCost()

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

setBaseTotalOfflineRefunded()

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

setBaseTotalOnlineRefunded()

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

setBaseTotalPaid()

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

setBaseTotalQtyOrdered()

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

setBaseTotalRefunded()

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

setBillingAddressId()

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

setCanReturnToStock()

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

setCanSendNewEmailFlag()

Set flag for order if it can sends new email to customer.

public setCanSendNewEmailFlag(bool $flag) : $this
Parameters
$flag : bool
Return values
$this

setCanShipPartially()

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

setCanShipPartiallyItem()

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

setConvertingFromQuote()

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

setCouponCode()

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

setCouponRuleName()

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

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

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

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

setDiscountAmount()

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

setDiscountCanceled()

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

setDiscountInvoiced()

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

setDiscountRefunded()

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

setEditIncrement()

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

setEmailSent()

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

setExtCustomerId()

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

setExtOrderId()

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

setForcedCanCreditmemo()

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

setForcedDoShipmentWithInvoice()

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

setHiddenTaxAmount()

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

setHiddenTaxInvoiced()

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

setHiddenTaxRefunded()

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

setHistoryEntityName()

Overrides entity id, which will be saved to comments history status

public setHistoryEntityName(string $entityName) : $this
Parameters
$entityName : string
Return values
$this

setHoldBeforeState()

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

setHoldBeforeStatus()

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

setIncrementId()

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

setIsInProcess()

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

setOrderCurrencyCode()

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

setOriginalIncrementId()

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

setPaymentAuthorizationAmount()

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

setPaymentAuthorizationExpiration()

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

setPaypalIpnCustomerNotified()

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

setProtectCode()

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

setQuoteAddressId()

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

setRelationChildId()

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

setRelationChildRealId()

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

setRelationParentId()

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

setRelationParentRealId()

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

setShippingAddressId()

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

setShippingAmount()

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

setShippingCanceled()

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

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

setShippingInvoiced()

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

setShippingRefunded()

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

setShippingTaxInvoiced()

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

setShippingTaxRefunded()

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

setState()

Order state setter.

public setState(string $state[, string|bool $status = false ][, string $comment = '' ][, bool $isCustomerNotified = null ]) : $this

If status is specified, will add order status history with specified comment the setData() cannot be overridden because of compatibility issues with resource model

Parameters
$state : string
$status : string|bool = false
$comment : string = ''
$isCustomerNotified : bool = null
Return values
$this

setStatus()

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

setStoreName()

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

setStoreToBaseRate()

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

setStoreToOrderRate()

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

setSubtotalCanceled()

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

setSubtotalInvoiced()

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

setSubtotalRefunded()

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

setTaxAmount()

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

setTaxCanceled()

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

setTaxInvoiced()

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

setTaxRefunded()

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

setTotalCanceled()

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

setTotalDue()

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

setTotalInvoiced()

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

setTotalItemCount()

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

setTotalOfflineRefunded()

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

setTotalOnlineRefunded()

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

setTotalPaid()

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

setTotalQtyOrdered()

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

setTotalRefunded()

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

setTransactionId()

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

setUpdatedAt()

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

setWeight()

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

unsBillingAddressId()

public unsBillingAddressId() : $this
Return values
$this

unsetData()

Clear order object data

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

data key

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

unsShippingAddressId()

public unsShippingAddressId() : $this
Return values
$this

__toJson()

Convert object attributes to JSON

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

array of required attributes

Return values
string

__toXml()

Convert object attributes to XML

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

array of required attributes

$rootName : string = 'item'

name of the root element

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

_addFullNames()

protected _addFullNames() : mixed

_afterDelete()

Processing object after delete data

protected _afterDelete() : $this
Return values
$this

_afterDeleteCommit()

Processing manipulation after main transaction commit

protected _afterDeleteCommit() : $this
Return values
$this

_afterLoad()

Processing object after load data

protected _afterLoad() : $this
Return values
$this

_afterSave()

Save order related objects

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

_assertStatusValidForState()

protected _assertStatusValidForState(string $status, string|null $state) : void
Parameters
$status : string
$state : string|null

_beforeDelete()

Protect order delete from not admin scope

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

_camelize()

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

_canReorder()

Retrieve order reorder availability

protected _canReorder([bool $ignoreSalable = false ]) : bool
Parameters
$ignoreSalable : bool = false
Return values
bool

_canVoidOrder()

Check whether order could be canceled by states and flags

protected _canVoidOrder() : bool
Return values
bool

_checkState()

Check order state before saving

protected _checkState() : mixed

_checkStatus()

Safety net for status writes that bypass setState() and addStatusHistoryComment().

protected _checkStatus() : void

A state change that leaves a stale status behind falls back to the state's default status. A pair already stored is left alone, since only new writes are the caller's responsibility.

_clearData()

Clearing object's data

protected _clearData() : $this
Return values
$this

_clearReferences()

Clearing cyclic references

protected _clearReferences() : $this
Return values
$this

_construct()

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

protected _construct() : void
Attributes
#[Override]

_getData()

Get value from _data array without parse key

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

_getEmails()

protected _getEmails(string $configPath) : array<string|int, mixed>|false
Parameters
$configPath : string
Return values
array<string|int, mixed>|false

_getEventData()

Get array of objects transferred to default events processing

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

_getPdfAttachmentInfo()

Descriptor for attaching this document as a PDF to an email, or null when the document has no printable PDF form. Overridden by invoice/shipment/creditmemo.

protected _getPdfAttachmentInfo() : array{source_model: string, entity_model: string, filename_prefix: string}|null
Return values
array{source_model: string, entity_model: string, filename_prefix: string}|null

_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

_placePayment()

Place order payments

protected _placePayment() : $this
Return values
$this

_prepareArray()

Set required array elements

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

_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

_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

_setState()

Order state protected setter.

protected _setState(string $state[, string|bool $status = false ][, string $comment = '' ][, bool $isCustomerNotified = null ][, bool $shouldProtectState = false ]) : $this

By default allows to set any state. Can also update status to default or specified value Сomplete and closed states are encapsulated intentionally, see the _checkState()

Parameters
$state : string
$status : string|bool = false
$comment : string = ''
$isCustomerNotified : bool = null
$shouldProtectState : bool = false
Return values
$this

_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