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
= []
$_addresses
protected
Mage_Sales_Model_Resource_Order_Address_Collection|array<string|int, Mage_Sales_Model_Order_Address>|null
$_addresses
= \null
$_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
$_creditmemos
protected
Mage_Sales_Model_Resource_Order_Creditmemo_Collection|array<string|int, Mage_Sales_Model_Order_Creditmemo>|false|null
$_creditmemos
$_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
$_invoices
protected
Mage_Sales_Model_Resource_Order_Invoice_Collection|null
$_invoices
$_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
$_items
protected
Mage_Sales_Model_Resource_Order_Item_Collection|array<string|int, Mage_Sales_Model_Order_Item>|null
$_items
= \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
$_payments
protected
Mage_Sales_Model_Resource_Order_Payment_Collection|array<string|int, Mage_Sales_Model_Order_Payment>|null
$_payments
= \null
$_relatedObjects
protected
mixed
$_relatedObjects
= []
$_resource
Resource model instance
protected
Mage_Core_Model_Resource_Db_Abstract
$_resource
$_resourceCollectionName
Name of the resource collection model
protected
string
$_resourceCollectionName
$_resourceName
Name of the resource model
protected
string
$_resourceName
$_shipments
protected
Mage_Sales_Model_Resource_Order_Shipment_Collection|false|null
$_shipments
$_statusHistory
protected
Mage_Sales_Model_Resource_Order_Status_History_Collection|array<string|int, Mage_Sales_Model_Order_Status_History>|null
$_statusHistory
= \null
$_syncFieldsMap
Map of fields to sync to other fields upon changing their data
protected
mixed
$_syncFieldsMap
= []
$_tracks
protected
Mage_Sales_Model_Resource_Order_Shipment_Track_Collection|null
$_tracks
$_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>_getResource()
Get resource instance
public
_getResource() : Mage_Sales_Model_Resource_Order
Return values
Mage_Sales_Model_Resource_OrderaddAddress()
public
addAddress(Mage_Sales_Model_Order_Address $address) : $this
Parameters
- $address : Mage_Sales_Model_Order_Address
Tags
Return values
$thisaddData()
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
$thisaddItem()
public
addItem(Mage_Sales_Model_Order_Item $item) : $this
Parameters
- $item : Mage_Sales_Model_Order_Item
Tags
Return values
$thisaddPayment()
public
addPayment(Mage_Sales_Model_Order_Payment $payment) : $this
Parameters
- $payment : Mage_Sales_Model_Order_Payment
Tags
Return values
$thisaddRelatedObject()
Add New object to related array
public
addRelatedObject(Mage_Core_Model_Abstract $object) : $this
Parameters
- $object : Mage_Core_Model_Abstract
Return values
$thisaddStatusHistory()
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
$thisaddStatusHistoryComment()
Add a comment to order Different or default status may be specified
public
addStatusHistoryComment(string $comment[, bool|string $status = false ]) : Mage_Sales_Model_Order_Status_History
Parameters
- $comment : string
- $status : bool|string = false
Return values
Mage_Sales_Model_Order_Status_HistoryafterCommitCallback()
Processing object after save data Updates relevant grid table records.
public
afterCommitCallback() : Mage_Core_Model_Abstract
Attributes
- #[Override]
Return values
Mage_Core_Model_AbstractafterLoad()
Object after load processing. Implemented as public interface for supporting objects after load in collections
public
afterLoad() : $this
Return values
$thiscanCancel()
Retrieve order cancel availability
public
canCancel() : bool
Return values
boolcancel()
Cancel order
public
cancel([string $comment = '' ]) : $this
Parameters
- $comment : string = ''
Return values
$thiscanComment()
Check if comment can be added to order history
public
canComment() : bool
Return values
boolcanCreditmemo()
Retrieve order credit memo (refund) availability
public
canCreditmemo() : bool
Return values
boolcanEdit()
Retrieve order edit availability
public
canEdit() : bool
Return values
boolcanFetchPaymentReviewUpdate()
Check whether there can be a transaction update fetched for payment in review state
public
canFetchPaymentReviewUpdate() : bool
Return values
boolcanHold()
Retrieve order hold availability
public
canHold() : bool
Return values
boolcanInvoice()
Retrieve order invoice availability
public
canInvoice() : bool
Return values
boolcanReorder()
Retrieve order reorder availability
public
canReorder() : bool
Return values
boolcanReorderIgnoreSalable()
Check the ability to reorder ignoring the availability in stock or status of the ordered products
public
canReorderIgnoreSalable() : bool
Return values
boolcanReviewPayment()
Check whether payment can be accepted or denied
public
canReviewPayment() : bool
Return values
boolcanShip()
Retrieve order shipment availability
public
canShip() : bool
Return values
boolcanUnhold()
Retrieve order unhold availability
public
canUnhold() : bool
Return values
boolcanVoidPayment()
Getter whether the payment can be voided
public
canVoidPayment() : bool
Return values
boolcleanModelCache()
Remove model object related cache
public
cleanModelCache() : $this
Return values
$thisclearInstance()
Clearing object for correct deleting by garbage collector
public
final clearInstance() : $this
Return values
$thisdataHasChangedFor()
Compare object data with original data
public
dataHasChangedFor(string $field) : bool
Parameters
- $field : string
Return values
booldebug()
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
Return values
$thisflagDirty()
public
flagDirty(string $field[, bool $flag = true ]) : $this
Parameters
- $field : string
- $flag : bool = true
Return values
$thisformatBasePrice()
public
formatBasePrice(float $price) : string
Parameters
- $price : float
Return values
stringformatBasePricePrecision()
public
formatBasePricePrecision(float $price, int $precision) : string
Parameters
- $price : float
- $precision : int
Return values
stringformatPrice()
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
stringformatPricePrecision()
public
formatPricePrecision(float $price, int $precision[, bool $addBrackets = false ]) : string
Parameters
- $price : float
- $precision : int
- $addBrackets : bool = false
Return values
stringformatPriceTxt()
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
stringgetActionFlag()
Retrieve can flag for action (edit, unhold, etc..)
public
getActionFlag(string $action) : bool|null
Parameters
- $action : string
Return values
bool|nullgetAddressById()
public
getAddressById(int|string $addressId) : false|Mage_Sales_Model_Order_Address
Parameters
- $addressId : int|string
Return values
false|Mage_Sales_Model_Order_AddressgetAddressesCollection()
public
getAddressesCollection() : Mage_Sales_Model_Resource_Order_Address_Collection
Return values
Mage_Sales_Model_Resource_Order_Address_CollectiongetAdjustmentNegative()
public
getAdjustmentNegative() : float|null
Return values
float|nullgetAdjustmentPositive()
public
getAdjustmentPositive() : float|null
Return values
float|nullgetAllItems()
public
getAllItems() : array<string|int, Mage_Sales_Model_Order_Item>
Return values
array<string|int, Mage_Sales_Model_Order_Item>getAllPayments()
public
getAllPayments() : array<string|int, Mage_Sales_Model_Order_Payment>
Return values
array<string|int, Mage_Sales_Model_Order_Payment>getAllStatusHistory()
Return collection of order status history items.
public
getAllStatusHistory() : array<string|int, Mage_Sales_Model_Order_Status_History>
Return values
array<string|int, Mage_Sales_Model_Order_Status_History>getAllVisibleItems()
public
getAllVisibleItems() : array<string|int, mixed>
Return values
array<string|int, mixed>getAppliedRuleIds()
public
getAppliedRuleIds() : string|null
Return values
string|nullgetAppliedTaxes()
public
getAppliedTaxes() : array<string|int, mixed>|null
Return values
array<string|int, mixed>|nullgetAppliedTaxIsSaved()
public
getAppliedTaxIsSaved() : bool|null
Return values
bool|nullgetBackUrl()
public
getBackUrl() : string|null
Return values
string|nullgetBaseAdjustmentNegative()
public
getBaseAdjustmentNegative() : float|null
Return values
float|nullgetBaseAdjustmentPositive()
public
getBaseAdjustmentPositive() : float|null
Return values
float|nullgetBaseCurrency()
Retrieve order website currency for working with base prices
public
getBaseCurrency() : Mage_Directory_Model_Currency
Return values
Mage_Directory_Model_CurrencygetBaseCurrencyCode()
public
getBaseCurrencyCode() : string|null
Return values
string|nullgetBaseDiscountAmount()
public
getBaseDiscountAmount() : float|null
Return values
float|nullgetBaseDiscountCanceled()
public
getBaseDiscountCanceled() : float|null
Return values
float|nullgetBaseDiscountInvoiced()
public
getBaseDiscountInvoiced() : float|null
Return values
float|nullgetBaseDiscountRefunded()
public
getBaseDiscountRefunded() : float|null
Return values
float|nullgetBaseGrandTotal()
public
getBaseGrandTotal() : float|null
Return values
float|nullgetBaseHiddenTaxAmount()
public
getBaseHiddenTaxAmount() : float|null
Return values
float|nullgetBaseHiddenTaxInvoiced()
public
getBaseHiddenTaxInvoiced() : float|null
Return values
float|nullgetBaseHiddenTaxRefunded()
public
getBaseHiddenTaxRefunded() : float|null
Return values
float|nullgetBaseShippingAmount()
public
getBaseShippingAmount() : float|null
Return values
float|nullgetBaseShippingCanceled()
public
getBaseShippingCanceled() : float|null
Return values
float|nullgetBaseShippingDiscountAmount()
public
getBaseShippingDiscountAmount() : float|null
Return values
float|nullgetBaseShippingHiddenTaxAmount()
public
getBaseShippingHiddenTaxAmount() : float|null
Return values
float|nullgetBaseShippingHiddenTaxInvoiced()
public
getBaseShippingHiddenTaxInvoiced() : float|null
Return values
float|nullgetBaseShippingHiddenTaxRefunded()
public
getBaseShippingHiddenTaxRefunded() : float|null
Return values
float|nullgetBaseShippingInclTax()
public
getBaseShippingInclTax() : float|null
Return values
float|nullgetBaseShippingInvoiced()
public
getBaseShippingInvoiced() : float|null
Return values
float|nullgetBaseShippingRefunded()
public
getBaseShippingRefunded() : float|null
Return values
float|nullgetBaseShippingTaxAmount()
public
getBaseShippingTaxAmount() : float|null
Return values
float|nullgetBaseShippingTaxInvoiced()
public
getBaseShippingTaxInvoiced() : float|null
Return values
float|nullgetBaseShippingTaxRefunded()
public
getBaseShippingTaxRefunded() : float|null
Return values
float|nullgetBaseSubtotal()
public
getBaseSubtotal() : float|null
Return values
float|nullgetBaseSubtotalCanceled()
public
getBaseSubtotalCanceled() : float|null
Return values
float|nullgetBaseSubtotalInclTax()
public
getBaseSubtotalInclTax() : float|null
Return values
float|nullgetBaseSubtotalInvoiced()
public
getBaseSubtotalInvoiced() : float|null
Return values
float|nullgetBaseSubtotalRefunded()
public
getBaseSubtotalRefunded() : float|null
Return values
float|nullgetBaseTaxAmount()
public
getBaseTaxAmount() : float|null
Return values
float|nullgetBaseTaxCanceled()
public
getBaseTaxCanceled() : float|null
Return values
float|nullgetBaseTaxInvoiced()
public
getBaseTaxInvoiced() : float|null
Return values
float|nullgetBaseTaxRefunded()
public
getBaseTaxRefunded() : float|null
Return values
float|nullgetBaseToGlobalRate()
public
getBaseToGlobalRate() : float|null
Return values
float|nullgetBaseToOrderRate()
public
getBaseToOrderRate() : float|null
Return values
float|nullgetBaseTotalCanceled()
public
getBaseTotalCanceled() : float|null
Return values
float|nullgetBaseTotalDue()
Retrieve order total due value
public
getBaseTotalDue() : float
Return values
floatgetBaseTotalInvoiced()
public
getBaseTotalInvoiced() : float|null
Return values
float|nullgetBaseTotalInvoicedCost()
public
getBaseTotalInvoicedCost() : float|null
Return values
float|nullgetBaseTotalOfflineRefunded()
public
getBaseTotalOfflineRefunded() : float|null
Return values
float|nullgetBaseTotalOnlineRefunded()
public
getBaseTotalOnlineRefunded() : float|null
Return values
float|nullgetBaseTotalPaid()
public
getBaseTotalPaid() : float|null
Return values
float|nullgetBaseTotalQtyOrdered()
public
getBaseTotalQtyOrdered() : float|null
Return values
float|nullgetBaseTotalRefunded()
public
getBaseTotalRefunded() : float|null
Return values
float|nullgetBillingAddress()
Retrieve order billing address
public
getBillingAddress() : Mage_Sales_Model_Order_Address|null
Attributes
- #[Override]
Return values
Mage_Sales_Model_Order_Address|nullgetBillingAddressId()
public
getBillingAddressId() : int|null
Return values
int|nullgetBillingFirstname()
public
getBillingFirstname() : string|null
Return values
string|nullgetBillingLastname()
public
getBillingLastname() : string|null
Return values
string|nullgetCacheIdTags()
Get cache tags associated with object id
public
getCacheIdTags() : array<string|int, mixed>|false
Return values
array<string|int, mixed>|falsegetCacheTags()
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>|falsegetCanReturnToStock()
public
getCanReturnToStock() : bool|null
Return values
bool|nullgetCanSendNewEmailFlag()
Return flag for order if it can sends new email to customer.
public
getCanSendNewEmailFlag() : bool
Return values
boolgetCanShipPartially()
public
getCanShipPartially() : bool|null
Return values
bool|nullgetCanShipPartiallyItem()
public
getCanShipPartiallyItem() : bool|null
Return values
bool|nullgetCollection()
public
getCollection() : Mage_Sales_Model_Resource_Order_Collection
Return values
Mage_Sales_Model_Resource_Order_CollectiongetConfig()
Retrieve order configuration model
public
getConfig() : Mage_Sales_Model_Order_Config
Return values
Mage_Sales_Model_Order_ConfiggetConvertingFromQuote()
public
getConvertingFromQuote() : bool|null
Return values
bool|nullgetCouponCode()
public
getCouponCode() : string|null
Return values
string|nullgetCreatedAt()
public
getCreatedAt() : string|null
Return values
string|nullgetCreatedAtDate()
Get object created at date affected current active store timezone
public
getCreatedAtDate() : DateTimeImmutable
Return values
DateTimeImmutablegetCreatedAtFormated()
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
stringgetCreatedAtStoreDate()
Get object created at date affected with object store timezone
public
getCreatedAtStoreDate() : DateTimeImmutable
Return values
DateTimeImmutablegetCreditmemosCollection()
Retrieve order creditmemos collection
public
getCreditmemosCollection() : Mage_Sales_Model_Resource_Order_Creditmemo_Collection|array<string|int, Mage_Sales_Model_Order_Creditmemo>|false
Return values
Mage_Sales_Model_Resource_Order_Creditmemo_Collection|array<string|int, Mage_Sales_Model_Order_Creditmemo>|falsegetCurrentCustomerEmail()
Get the current customer email.
public
getCurrentCustomerEmail() : string
Return values
stringgetCustomer()
public
getCustomer() : Mage_Customer_Model_Customer|null
Return values
Mage_Customer_Model_Customer|nullgetCustomerDob()
public
getCustomerDob() : string|null
Return values
string|nullgetCustomerEmail()
public
getCustomerEmail() : string|null
Return values
string|nullgetCustomerFirstname()
public
getCustomerFirstname() : string|null
Return values
string|nullgetCustomerGender()
public
getCustomerGender() : int|null
Return values
int|nullgetCustomerGroupId()
public
getCustomerGroupId() : int|null
Return values
int|nullgetCustomerId()
public
getCustomerId() : int|null
Return values
int|nullgetCustomerIsGuest()
public
getCustomerIsGuest() : bool|null
Return values
bool|nullgetCustomerLastname()
public
getCustomerLastname() : string|null
Return values
string|nullgetCustomerMiddlename()
public
getCustomerMiddlename() : string|null
Return values
string|nullgetCustomerName()
Retrieve customer name
public
getCustomerName() : string
Return values
stringgetCustomerNote()
public
getCustomerNote() : string|null
Return values
string|nullgetCustomerNoteNotify()
public
getCustomerNoteNotify() : bool|null
Return values
bool|nullgetCustomerPrefix()
public
getCustomerPrefix() : string|null
Return values
string|nullgetCustomerSuffix()
public
getCustomerSuffix() : string|null
Return values
string|nullgetCustomerTaxvat()
public
getCustomerTaxvat() : string|null
Return values
string|nullgetData()
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|mixedgetDataByKey()
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|nullgetDiscountCanceled()
public
getDiscountCanceled() : float|null
Return values
float|nullgetDiscountDescription()
public
getDiscountDescription() : string|null
Return values
string|nullgetDiscountInvoiced()
public
getDiscountInvoiced() : float|null
Return values
float|nullgetDiscountRefunded()
public
getDiscountRefunded() : float|null
Return values
float|nullgetEditIncrement()
public
getEditIncrement() : int|null
Return values
int|nullgetEmailCustomerNote()
public
getEmailCustomerNote() : string
Return values
stringgetEmailSent()
public
getEmailSent() : bool|null
Return values
bool|nullgetEntityId()
public
getEntityId() : int
Return values
intgetExtCustomerId()
public
getExtCustomerId() : string|null
Return values
string|nullgetExtOrderId()
public
getExtOrderId() : string|null
Return values
string|nullgetForcedCanCreditmemo()
public
getForcedCanCreditmemo() : bool|null
Return values
bool|nullgetForcedDoShipmentWithInvoice()
public
getForcedDoShipmentWithInvoice() : int|null
Return values
int|nullgetForceUpdateGridRecords()
public
getForceUpdateGridRecords() : bool|null
Return values
bool|nullgetFullTaxInfo()
public
getFullTaxInfo() : mixed
getGiftMessageId()
public
getGiftMessageId() : int|null
Return values
int|nullgetGlobalCurrencyCode()
public
getGlobalCurrencyCode() : string|null
Return values
string|nullgetGrandTotal()
public
getGrandTotal() : float|null
Return values
float|nullgetHiddenTaxAmount()
public
getHiddenTaxAmount() : float|null
Return values
float|nullgetHiddenTaxInvoiced()
public
getHiddenTaxInvoiced() : float|null
Return values
float|nullgetHiddenTaxRefunded()
public
getHiddenTaxRefunded() : float|null
Return values
float|nullgetHoldBeforeState()
public
getHoldBeforeState() : string|null
Return values
string|nullgetHoldBeforeStatus()
public
getHoldBeforeStatus() : string|null
Return values
string|nullgetId()
Retrieve model object identifier
public
getId() : int|string|null
Attributes
- #[Override]
Return values
int|string|nullgetIdFieldName()
Retrieve identifier field name for model
public
getIdFieldName() : string
Attributes
- #[Override]
Return values
stringgetIncrementId()
public
getIncrementId() : string|null
Return values
string|nullgetInvoiceCollection()
Retrieve order invoices collection
public
getInvoiceCollection() : Mage_Sales_Model_Resource_Order_Invoice_Collection
Return values
Mage_Sales_Model_Resource_Order_Invoice_CollectiongetInvoicesCollection()
Retrieve order invoices collection
public
getInvoicesCollection() : Mage_Sales_Model_Resource_Order_Invoice_Collection
Return values
Mage_Sales_Model_Resource_Order_Invoice_CollectiongetIsInProcess()
public
getIsInProcess() : bool|null
Return values
bool|nullgetIsMultiPayment()
public
getIsMultiPayment() : bool|null
Return values
bool|nullgetIsNotVirtual()
public
getIsNotVirtual() : bool
Return values
boolgetIsVirtual()
public
getIsVirtual() : bool|null
Return values
bool|nullgetItemById()
public
getItemById(int $itemId) : Mage_Sales_Model_Order_Item|null
Parameters
- $itemId : int
Return values
Mage_Sales_Model_Order_Item|nullgetItemByQuoteItemId()
public
getItemByQuoteItemId(int $quoteItemId) : Mage_Sales_Model_Order_Item|null
Parameters
- $quoteItemId : int
Return values
Mage_Sales_Model_Order_Item|nullgetItemsCollection()
public
getItemsCollection([array<string|int, mixed> $filterByTypes = [] ][, bool $nonChildrenOnly = false ]) : Mage_Sales_Model_Resource_Order_Item_Collection
Parameters
- $filterByTypes : array<string|int, mixed> = []
- $nonChildrenOnly : bool = false
Return values
Mage_Sales_Model_Resource_Order_Item_CollectiongetItemsRandomCollection()
Get random items collection with related children
public
getItemsRandomCollection([int $limit = 1 ]) : Mage_Sales_Model_Resource_Order_Item_Collection
Parameters
- $limit : int = 1
Return values
Mage_Sales_Model_Resource_Order_Item_CollectiongetOrderCurrency()
Get currency model instance. Will be used currency with which order placed
public
getOrderCurrency() : Mage_Directory_Model_Currency
Return values
Mage_Directory_Model_CurrencygetOrderCurrencyCode()
public
getOrderCurrencyCode() : string|null
Return values
string|nullgetOrigData()
Get object loaded data (original data)
public
getOrigData([string $key = null ]) : mixed
Parameters
- $key : string = null
getOriginalIncrementId()
public
getOriginalIncrementId() : string|null
Return values
string|nullgetParentItemsRandomCollection()
Get random items collection without related children
public
getParentItemsRandomCollection([int $limit = 1 ]) : Mage_Sales_Model_Resource_Order_Item_Collection
Parameters
- $limit : int = 1
Return values
Mage_Sales_Model_Resource_Order_Item_CollectiongetPayment()
Retrieve order payment model object
public
getPayment() : Mage_Sales_Model_Order_Payment|false
Return values
Mage_Sales_Model_Order_Payment|falsegetPaymentAuthorizationAmount()
public
getPaymentAuthorizationAmount() : float|null
Return values
float|nullgetPaymentAuthorizationExpiration()
public
getPaymentAuthorizationExpiration() : int|null
Return values
int|nullgetPaymentById()
public
getPaymentById(int $paymentId) : bool|Mage_Sales_Model_Order_Payment
Parameters
- $paymentId : int
Return values
bool|Mage_Sales_Model_Order_PaymentgetPaymentsCollection()
public
getPaymentsCollection() : Mage_Sales_Model_Resource_Order_Payment_Collection
Return values
Mage_Sales_Model_Resource_Order_Payment_CollectiongetPaypalIpnCustomerNotified()
public
getPaypalIpnCustomerNotified() : int|null
Return values
int|nullgetProtectCode()
public
getProtectCode() : string|null
Return values
string|nullgetQuantity()
public
getQuantity() : float|null
Return values
float|nullgetQuote()
public
getQuote() : Mage_Sales_Model_Quote|null
Return values
Mage_Sales_Model_Quote|nullgetQuoteAddressId()
public
getQuoteAddressId() : int|null
Return values
int|nullgetQuoteBaseGrandTotal()
public
getQuoteBaseGrandTotal() : float|null
Return values
float|nullgetQuoteId()
public
getQuoteId() : int|null
Return values
int|nullgetRealOrderId()
public
getRealOrderId() : string
Return values
stringgetRelatedObjects()
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|nullgetRelationChildRealId()
public
getRelationChildRealId() : string|null
Return values
string|nullgetRelationParentId()
public
getRelationParentId() : string|null
Return values
string|nullgetRelationParentRealId()
public
getRelationParentRealId() : string|null
Return values
string|nullgetRemoteIp()
public
getRemoteIp() : string|null
Return values
string|nullgetReordered()
public
getReordered() : bool|null
Return values
bool|nullgetResource()
Retrieve model resource
public
getResource() : Mage_Sales_Model_Resource_Order
Return values
Mage_Sales_Model_Resource_OrdergetResourceCollection()
Get collection instance
public
getResourceCollection() : Mage_Core_Model_Resource_Db_Collection_Abstract
Tags
Return values
Mage_Core_Model_Resource_Db_Collection_AbstractgetResourceName()
Retrieve model resource name
public
getResourceName() : string
Return values
stringgetRevenue()
public
getRevenue() : float|null
Return values
float|nullgetRowTaxDisplayPrecision()
public
getRowTaxDisplayPrecision() : int|null
Return values
int|nullgetShipmentsCollection()
Retrieve order shipments collection
public
getShipmentsCollection() : Mage_Sales_Model_Resource_Order_Shipment_Collection|false
Return values
Mage_Sales_Model_Resource_Order_Shipment_Collection|falsegetShipping()
public
getShipping() : float|null
Return values
float|nullgetShippingAddress()
Retrieve order shipping address
public
getShippingAddress() : Mage_Sales_Model_Order_Address|null
Attributes
- #[Override]
Return values
Mage_Sales_Model_Order_Address|nullgetShippingAddressId()
public
getShippingAddressId() : int|null
Return values
int|nullgetShippingAmount()
public
getShippingAmount() : float|null
Return values
float|nullgetShippingCanceled()
public
getShippingCanceled() : float|null
Return values
float|nullgetShippingCarrier()
Return model of shipping carrier
public
getShippingCarrier() : Mage_Shipping_Model_Carrier_Abstract
Return values
Mage_Shipping_Model_Carrier_AbstractgetShippingDescription()
public
getShippingDescription() : string|null
Return values
string|nullgetShippingDiscountAmount()
public
getShippingDiscountAmount() : float|null
Return values
float|nullgetShippingHiddenTaxAmount()
public
getShippingHiddenTaxAmount() : float|null
Return values
float|nullgetShippingHiddenTaxInvoiced()
public
getShippingHiddenTaxInvoiced() : float|null
Return values
float|nullgetShippingHiddenTaxRefunded()
public
getShippingHiddenTaxRefunded() : float|null
Return values
float|nullgetShippingInclTax()
public
getShippingInclTax() : float|null
Return values
float|nullgetShippingInvoiced()
public
getShippingInvoiced() : float|null
Return values
float|nullgetShippingMethod()
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|DataObjectgetShippingRefunded()
public
getShippingRefunded() : float|null
Return values
float|nullgetShippingTaxAmount()
public
getShippingTaxAmount() : float|null
Return values
float|nullgetShippingTaxInvoiced()
public
getShippingTaxInvoiced() : float|null
Return values
float|nullgetShippingTaxRefunded()
public
getShippingTaxRefunded() : float|null
Return values
float|nullgetState()
public
getState() : string|null
Return values
string|nullgetStatus()
public
getStatus() : string|null
Return values
string|nullgetStatusHistoryById()
public
getStatusHistoryById(int $statusId) : false|Mage_Sales_Model_Order_Status_History
Parameters
- $statusId : int
Return values
false|Mage_Sales_Model_Order_Status_HistorygetStatusHistoryCollection()
public
getStatusHistoryCollection([bool $reload = false ]) : Mage_Sales_Model_Resource_Order_Status_History_Collection
Parameters
- $reload : bool = false
Return values
Mage_Sales_Model_Resource_Order_Status_History_CollectiongetStatusLabel()
Retrieve label of order status
public
getStatusLabel() : string
Return values
stringgetStore()
Retrieve store model instance
public
getStore() : Mage_Core_Model_Store
Attributes
- #[Override]
Return values
Mage_Core_Model_StoregetStoreCurrencyCode()
public
getStoreCurrencyCode() : string|null
Return values
string|nullgetStoreGroupName()
public
getStoreGroupName() : string|null
Return values
string|nullgetStoreId()
public
getStoreId() : int|null
Return values
int|nullgetStoreName()
public
getStoreName() : string|null
Return values
string|nullgetStoreToBaseRate()
public
getStoreToBaseRate() : float|null
Return values
float|nullgetStoreToOrderRate()
public
getStoreToOrderRate() : float|null
Return values
float|nullgetSubtotal()
public
getSubtotal() : float|null
Return values
float|nullgetSubtotalCanceled()
public
getSubtotalCanceled() : float|null
Return values
float|nullgetSubtotalInclTax()
public
getSubtotalInclTax() : float|null
Return values
float|nullgetSubtotalInvoiced()
public
getSubtotalInvoiced() : float|null
Return values
float|nullgetSubtotalRefunded()
public
getSubtotalRefunded() : float|null
Return values
float|nullgetTax()
public
getTax() : float|null
Return values
float|nullgetTaxAmount()
public
getTaxAmount() : float|null
Return values
float|nullgetTaxCanceled()
public
getTaxCanceled() : float|null
Return values
float|nullgetTaxInvoiced()
public
getTaxInvoiced() : float|null
Return values
float|nullgetTaxRefunded()
public
getTaxRefunded() : float|null
Return values
float|nullgetTotalCanceled()
public
getTotalCanceled() : float|null
Return values
float|nullgetTotalDue()
Retrieve order total due value
public
getTotalDue() : float
Return values
floatgetTotalInvoiced()
public
getTotalInvoiced() : float|null
Return values
float|nullgetTotalItemCount()
public
getTotalItemCount() : int|null
Return values
int|nullgetTotalOfflineRefunded()
public
getTotalOfflineRefunded() : float|null
Return values
float|nullgetTotalOnlineRefunded()
public
getTotalOnlineRefunded() : float|null
Return values
float|nullgetTotalPaid()
public
getTotalPaid() : float|null
Return values
float|nullgetTotalQtyOrdered()
public
getTotalQtyOrdered() : float|null
Return values
float|nullgetTotalRefunded()
public
getTotalRefunded() : float|null
Return values
float|nullgetTrackingNumbers()
Retrieve tracking numbers
public
getTrackingNumbers() : array<string|int, mixed>
Return values
array<string|int, mixed>getTracksCollection()
Retrieve order tracking numbers collection
public
getTracksCollection() : Mage_Sales_Model_Resource_Order_Shipment_Track_Collection
Return values
Mage_Sales_Model_Resource_Order_Shipment_Track_CollectiongetUpdatedAt()
public
getUpdatedAt() : string|null
Return values
string|nullgetVisibleStatusHistory()
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|nullgetXForwardedFor()
public
getXForwardedFor() : string|null
Return values
string|nullhasBillingAddressId()
public
hasBillingAddressId() : bool
Return values
boolhasCanReturnToStock()
public
hasCanReturnToStock() : bool
Return values
boolhasCreditmemos()
Check order creditmemos availability
public
hasCreditmemos() : bool
Return values
boolhasCustomerNoteNotify()
public
hasCustomerNoteNotify() : bool
Return values
boolhasData()
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
boolhasDataChanges()
Get data change status
public
hasDataChanges() : bool
Return values
boolhasErrors()
public
hasErrors() : bool
Return values
boolhasForcedCanCreditmemo()
public
hasForcedCanCreditmemo() : bool
Return values
boolhasInvoices()
Check order invoices availability
public
hasInvoices() : int
Return values
inthasShipments()
Check order shipments availability
public
hasShipments() : bool
Return values
boolhasShippingAddressId()
public
hasShippingAddressId() : bool
Return values
boolhold()
public
hold() : $this
Tags
Return values
$thisisCanceled()
Check whether order is canceled
public
isCanceled() : bool
Return values
boolisCurrencyDifferent()
public
isCurrencyDifferent() : bool
Return values
boolisDeleted()
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
boolisDirty()
public
isDirty([string $field = null ]) : bool
Parameters
- $field : string = null
Return values
boolisEmpty()
checks whether the object is empty
public
isEmpty() : bool
Return values
boolisModuleEnabled()
public
isModuleEnabled(string $moduleName[, string $helperAlias = 'core' ]) : bool
Parameters
- $moduleName : string
- $helperAlias : string = 'core'
Return values
boolisNominal()
Whether the order has nominal items only
public
isNominal() : bool
Return values
boolisObjectNew()
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
boolisPaymentReview()
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
boolisStateProtected()
Whether specified state can be set from outside
public
isStateProtected(string $state) : bool
Parameters
- $state : string
Return values
boolisStatusValidForState()
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
booljsonSerialize()
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
$thisloadByAttribute()
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
$thisloadByIncrementId()
Load order by system increment identifier
public
loadByIncrementId(string $incrementId) : $this
Parameters
- $incrementId : string
Return values
$thisoffsetExists()
Implementation of ArrayAccess::offsetExists()
public
offsetExists(string $offset) : bool
Parameters
- $offset : string
Tags
Attributes
- #[Override]
Return values
booloffsetGet()
Implementation of ArrayAccess::offsetGet()
public
offsetGet(string $offset) : mixed
Parameters
- $offset : string
Tags
Attributes
- #[Override]
- #[ReturnTypeWillChange]
offsetSet()
Implementation of ArrayAccess::offsetSet()
public
offsetSet(string $offset, mixed $value) : void
Parameters
- $offset : string
- $value : mixed
Tags
Attributes
- #[Override]
offsetUnset()
Implementation of ArrayAccess::offsetUnset()
public
offsetUnset(string $offset) : void
Parameters
- $offset : string
Tags
Attributes
- #[Override]
place()
Place order
public
place() : $this
Return values
$thisprepareInvoice()
Create new invoice with maximum qty for invoice for each item
public
prepareInvoice([array<string|int, mixed> $qtys = [] ]) : Mage_Sales_Model_Order_Invoice
Parameters
- $qtys : array<string|int, mixed> = []
Return values
Mage_Sales_Model_Order_InvoiceprepareShipment()
Create new shipment with maximum qty for shipping for each item
public
prepareShipment([array<string|int, mixed> $qtys = [] ]) : Mage_Sales_Model_Order_Shipment
Parameters
- $qtys : array<string|int, mixed> = []
Return values
Mage_Sales_Model_Order_ShipmentqueueNewOrderEmail()
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
Return values
$thisqueueOrderUpdateEmail()
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
$thisregisterCancellation()
Prepare order totals to cancellation
public
registerCancellation([string $comment = '' ][, bool $graceful = true ]) : $this
Parameters
- $comment : string = ''
- $graceful : bool = true
Tags
Return values
$thisreset()
Resets all data in object so after another load it will be complete new object
public
reset() : $this
Return values
$thissave()
Save object data
public
save() : $this
Tags
Return values
$thissendNewOrderEmail()
Send email with order data
public
sendNewOrderEmail() : $this
Return values
$thissendOrderUpdateEmail()
Send email with order update information
public
sendOrderUpdateEmail([bool $notifyCustomer = true ][, string $comment = '' ]) : $this
Parameters
- $notifyCustomer : bool = true
- $comment : string = ''
Return values
$thisserialize()
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
stringsetActionFlag()
Set can flag value for action (edit, unhold, etc...)
public
setActionFlag(string $action, bool $flag) : $this
Parameters
- $action : string
- $flag : bool
Return values
$thissetAdjustmentNegative()
public
setAdjustmentNegative(float|null $value) : static
Parameters
- $value : float|null
Return values
staticsetAdjustmentPositive()
public
setAdjustmentPositive(float|null $value) : static
Parameters
- $value : float|null
Return values
staticsetAppliedRuleIds()
public
setAppliedRuleIds(string|null $value) : static
Parameters
- $value : string|null
Return values
staticsetAppliedTaxes()
public
setAppliedTaxes(array<string|int, mixed>|null $value) : static
Parameters
- $value : array<string|int, mixed>|null
Return values
staticsetAppliedTaxIsSaved()
public
setAppliedTaxIsSaved([bool|null $value = true ]) : static
Parameters
- $value : bool|null = true
Return values
staticsetAttribute()
public
setAttribute(Mage_Eav_Model_Entity_Attribute_Abstract $value) : $this
Parameters
Return values
$thissetBaseAdjustmentNegative()
public
setBaseAdjustmentNegative(float|null $value) : static
Parameters
- $value : float|null
Return values
staticsetBaseAdjustmentPositive()
public
setBaseAdjustmentPositive(float|null $value) : static
Parameters
- $value : float|null
Return values
staticsetBaseCurrencyCode()
public
setBaseCurrencyCode(string|null $value) : static
Parameters
- $value : string|null
Return values
staticsetBaseDiscountAmount()
public
setBaseDiscountAmount(float|null $value) : static
Parameters
- $value : float|null
Return values
staticsetBaseDiscountCanceled()
public
setBaseDiscountCanceled(float|null $value) : static
Parameters
- $value : float|null
Return values
staticsetBaseDiscountInvoiced()
public
setBaseDiscountInvoiced(float|null $value) : static
Parameters
- $value : float|null
Return values
staticsetBaseDiscountRefunded()
public
setBaseDiscountRefunded(float|null $value) : static
Parameters
- $value : float|null
Return values
staticsetBaseGrandTotal()
public
setBaseGrandTotal(float|null $value) : static
Parameters
- $value : float|null
Return values
staticsetBaseHiddenTaxAmount()
public
setBaseHiddenTaxAmount(float|null $value) : static
Parameters
- $value : float|null
Return values
staticsetBaseHiddenTaxInvoiced()
public
setBaseHiddenTaxInvoiced(float|null $value) : static
Parameters
- $value : float|null
Return values
staticsetBaseHiddenTaxRefunded()
public
setBaseHiddenTaxRefunded(float|null $value) : static
Parameters
- $value : float|null
Return values
staticsetBaseShippingAmount()
public
setBaseShippingAmount(float|null $value) : static
Parameters
- $value : float|null
Return values
staticsetBaseShippingCanceled()
public
setBaseShippingCanceled(float|null $value) : static
Parameters
- $value : float|null
Return values
staticsetBaseShippingDiscountAmount()
public
setBaseShippingDiscountAmount(float|null $value) : static
Parameters
- $value : float|null
Return values
staticsetBaseShippingHiddenTaxAmount()
public
setBaseShippingHiddenTaxAmount(float|null $value) : static
Parameters
- $value : float|null
Return values
staticsetBaseShippingInclTax()
public
setBaseShippingInclTax(float|null $value) : static
Parameters
- $value : float|null
Return values
staticsetBaseShippingInvoiced()
public
setBaseShippingInvoiced(float|null $value) : static
Parameters
- $value : float|null
Return values
staticsetBaseShippingRefunded()
public
setBaseShippingRefunded(float|null $value) : static
Parameters
- $value : float|null
Return values
staticsetBaseShippingTaxAmount()
public
setBaseShippingTaxAmount(float|null $value) : static
Parameters
- $value : float|null
Return values
staticsetBaseShippingTaxInvoiced()
public
setBaseShippingTaxInvoiced(float|null $value) : static
Parameters
- $value : float|null
Return values
staticsetBaseShippingTaxRefunded()
public
setBaseShippingTaxRefunded(float|null $value) : static
Parameters
- $value : float|null
Return values
staticsetBaseSubtotal()
public
setBaseSubtotal(float|null $value) : static
Parameters
- $value : float|null
Return values
staticsetBaseSubtotalCanceled()
public
setBaseSubtotalCanceled(float|null $value) : static
Parameters
- $value : float|null
Return values
staticsetBaseSubtotalInclTax()
public
setBaseSubtotalInclTax(float|null $value) : static
Parameters
- $value : float|null
Return values
staticsetBaseSubtotalInvoiced()
public
setBaseSubtotalInvoiced(float|null $value) : static
Parameters
- $value : float|null
Return values
staticsetBaseSubtotalRefunded()
public
setBaseSubtotalRefunded(float|null $value) : static
Parameters
- $value : float|null
Return values
staticsetBaseTaxAmount()
public
setBaseTaxAmount(float|null $value) : static
Parameters
- $value : float|null
Return values
staticsetBaseTaxCanceled()
public
setBaseTaxCanceled(float|null $value) : static
Parameters
- $value : float|null
Return values
staticsetBaseTaxInvoiced()
public
setBaseTaxInvoiced(float|null $value) : static
Parameters
- $value : float|null
Return values
staticsetBaseTaxRefunded()
public
setBaseTaxRefunded(float|null $value) : static
Parameters
- $value : float|null
Return values
staticsetBaseToGlobalRate()
public
setBaseToGlobalRate(float|null $value) : static
Parameters
- $value : float|null
Return values
staticsetBaseToOrderRate()
public
setBaseToOrderRate(float|null $value) : static
Parameters
- $value : float|null
Return values
staticsetBaseTotalCanceled()
public
setBaseTotalCanceled(float|null $value) : static
Parameters
- $value : float|null
Return values
staticsetBaseTotalDue()
public
setBaseTotalDue(float|null $value) : static
Parameters
- $value : float|null
Return values
staticsetBaseTotalInvoiced()
public
setBaseTotalInvoiced(float|null $value) : static
Parameters
- $value : float|null
Return values
staticsetBaseTotalInvoicedCost()
public
setBaseTotalInvoicedCost(float|null $value) : static
Parameters
- $value : float|null
Return values
staticsetBaseTotalOfflineRefunded()
public
setBaseTotalOfflineRefunded(float|null $value) : static
Parameters
- $value : float|null
Return values
staticsetBaseTotalOnlineRefunded()
public
setBaseTotalOnlineRefunded(float|null $value) : static
Parameters
- $value : float|null
Return values
staticsetBaseTotalPaid()
public
setBaseTotalPaid(float|null $value) : static
Parameters
- $value : float|null
Return values
staticsetBaseTotalQtyOrdered()
public
setBaseTotalQtyOrdered(float|null $value) : static
Parameters
- $value : float|null
Return values
staticsetBaseTotalRefunded()
public
setBaseTotalRefunded(float|null $value) : static
Parameters
- $value : float|null
Return values
staticsetBillingAddress()
Declare order billing address
public
setBillingAddress(Mage_Sales_Model_Order_Address $address) : $this
Parameters
- $address : Mage_Sales_Model_Order_Address
Return values
$thissetBillingAddressId()
public
setBillingAddressId(int|null $value) : static
Parameters
- $value : int|null
Return values
staticsetCanReturnToStock()
public
setCanReturnToStock([bool|null $value = true ]) : static
Parameters
- $value : bool|null = true
Return values
staticsetCanSendNewEmailFlag()
Set flag for order if it can sends new email to customer.
public
setCanSendNewEmailFlag(bool $flag) : $this
Parameters
- $flag : bool
Return values
$thissetCanShipPartially()
public
setCanShipPartially([bool|null $value = true ]) : static
Parameters
- $value : bool|null = true
Return values
staticsetCanShipPartiallyItem()
public
setCanShipPartiallyItem([bool|null $value = true ]) : static
Parameters
- $value : bool|null = true
Return values
staticsetConvertingFromQuote()
public
setConvertingFromQuote([bool|null $value = true ]) : static
Parameters
- $value : bool|null = true
Return values
staticsetCouponCode()
public
setCouponCode(string|null $value) : static
Parameters
- $value : string|null
Return values
staticsetCouponRuleName()
public
setCouponRuleName(string|null $value) : static
Parameters
- $value : string|null
Return values
staticsetCreatedAt()
public
setCreatedAt(string|null $value) : static
Parameters
- $value : string|null
Return values
staticsetCustomer()
public
setCustomer(Mage_Customer_Model_Customer|null $value) : static
Parameters
- $value : Mage_Customer_Model_Customer|null
Return values
staticsetCustomerDob()
public
setCustomerDob(string|null $value) : static
Parameters
- $value : string|null
Return values
staticsetCustomerEmail()
public
setCustomerEmail(string|null $value) : static
Parameters
- $value : string|null
Return values
staticsetCustomerFirstname()
public
setCustomerFirstname(string|null $value) : static
Parameters
- $value : string|null
Return values
staticsetCustomerGender()
public
setCustomerGender(int|null $value) : static
Parameters
- $value : int|null
Return values
staticsetCustomerGroupId()
public
setCustomerGroupId(int|null $value) : static
Parameters
- $value : int|null
Return values
staticsetCustomerId()
public
setCustomerId(int|null $value) : static
Parameters
- $value : int|null
Return values
staticsetCustomerIsGuest()
public
setCustomerIsGuest([bool|null $value = true ]) : static
Parameters
- $value : bool|null = true
Return values
staticsetCustomerLastname()
public
setCustomerLastname(string|null $value) : static
Parameters
- $value : string|null
Return values
staticsetCustomerMiddlename()
public
setCustomerMiddlename(string|null $value) : static
Parameters
- $value : string|null
Return values
staticsetCustomerNote()
public
setCustomerNote(string|null $value) : static
Parameters
- $value : string|null
Return values
staticsetCustomerNoteNotify()
public
setCustomerNoteNotify([bool|null $value = true ]) : static
Parameters
- $value : bool|null = true
Return values
staticsetCustomerPrefix()
public
setCustomerPrefix(string|null $value) : static
Parameters
- $value : string|null
Return values
staticsetCustomerSuffix()
public
setCustomerSuffix(string|null $value) : static
Parameters
- $value : string|null
Return values
staticsetCustomerTaxvat()
public
setCustomerTaxvat(string|null $value) : static
Parameters
- $value : string|null
Return values
staticsetData()
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
$thissetDataChanges()
Clears data changes status
public
setDataChanges(bool $value) : $this
Parameters
- $value : bool
Return values
$thissetDataUsingMethod()
Set object data with calling setter method
public
setDataUsingMethod(string $key[, mixed $args = [] ]) : $this
Parameters
- $key : string
- $args : mixed = []
Return values
$thissetDiscountAmount()
public
setDiscountAmount(float|null $value) : static
Parameters
- $value : float|null
Return values
staticsetDiscountCanceled()
public
setDiscountCanceled(float|null $value) : static
Parameters
- $value : float|null
Return values
staticsetDiscountDescription()
public
setDiscountDescription(string|null $value) : static
Parameters
- $value : string|null
Return values
staticsetDiscountInvoiced()
public
setDiscountInvoiced(float|null $value) : static
Parameters
- $value : float|null
Return values
staticsetDiscountRefunded()
public
setDiscountRefunded(float|null $value) : static
Parameters
- $value : float|null
Return values
staticsetEditIncrement()
public
setEditIncrement(int|null $value) : static
Parameters
- $value : int|null
Return values
staticsetEmailSent()
public
setEmailSent([bool|null $value = true ]) : static
Parameters
- $value : bool|null = true
Return values
staticsetExtCustomerId()
public
setExtCustomerId(string|null $value) : static
Parameters
- $value : string|null
Return values
staticsetExtOrderId()
public
setExtOrderId(string|null $value) : static
Parameters
- $value : string|null
Return values
staticsetForcedCanCreditmemo()
public
setForcedCanCreditmemo([bool|null $value = true ]) : static
Parameters
- $value : bool|null = true
Return values
staticsetForcedDoShipmentWithInvoice()
public
setForcedDoShipmentWithInvoice(int|null $value) : static
Parameters
- $value : int|null
Return values
staticsetGiftMessage()
public
setGiftMessage(string|null $value) : static
Parameters
- $value : string|null
Return values
staticsetGiftMessageId()
public
setGiftMessageId(int|null $value) : static
Parameters
- $value : int|null
Return values
staticsetGlobalCurrencyCode()
public
setGlobalCurrencyCode(string|null $value) : static
Parameters
- $value : string|null
Return values
staticsetGrandTotal()
public
setGrandTotal(float|null $value) : static
Parameters
- $value : float|null
Return values
staticsetHiddenTaxAmount()
public
setHiddenTaxAmount(float|null $value) : static
Parameters
- $value : float|null
Return values
staticsetHiddenTaxInvoiced()
public
setHiddenTaxInvoiced(float|null $value) : static
Parameters
- $value : float|null
Return values
staticsetHiddenTaxRefunded()
public
setHiddenTaxRefunded(float|null $value) : static
Parameters
- $value : float|null
Return values
staticsetHistoryEntityName()
Overrides entity id, which will be saved to comments history status
public
setHistoryEntityName(string $entityName) : $this
Parameters
- $entityName : string
Return values
$thissetHoldBeforeState()
public
setHoldBeforeState(string|null $value) : static
Parameters
- $value : string|null
Return values
staticsetHoldBeforeStatus()
public
setHoldBeforeStatus(string|null $value) : static
Parameters
- $value : string|null
Return values
staticsetId()
Declare model object identifier value
public
setId(mixed $id) : $this
Parameters
- $id : mixed
Attributes
- #[Override]
Return values
$thissetIdFieldName()
set name of object id field
public
setIdFieldName(string $name) : $this
Parameters
- $name : string
Return values
$thissetIncrementId()
public
setIncrementId(string|null $value) : static
Parameters
- $value : string|null
Return values
staticsetIsInProcess()
public
setIsInProcess([bool|null $value = true ]) : static
Parameters
- $value : bool|null = true
Return values
staticsetIsVirtual()
public
setIsVirtual([bool|null $value = true ]) : static
Parameters
- $value : bool|null = true
Return values
staticsetOrderCurrencyCode()
public
setOrderCurrencyCode(string|null $value) : static
Parameters
- $value : string|null
Return values
staticsetOrigData()
Initialize object original data
public
setOrigData([string $key = null ][, mixed $data = null ]) : $this
Parameters
- $key : string = null
- $data : mixed = null
Return values
$thissetOriginalIncrementId()
public
setOriginalIncrementId(string|null $value) : static
Parameters
- $value : string|null
Return values
staticsetPayment()
public
setPayment(Mage_Sales_Model_Order_Payment $payment) : Mage_Sales_Model_Order_Payment
Parameters
- $payment : Mage_Sales_Model_Order_Payment
Return values
Mage_Sales_Model_Order_PaymentsetPaymentAuthorizationAmount()
public
setPaymentAuthorizationAmount(float|null $value) : static
Parameters
- $value : float|null
Return values
staticsetPaymentAuthorizationExpiration()
public
setPaymentAuthorizationExpiration(int|null $value) : static
Parameters
- $value : int|null
Return values
staticsetPaypalIpnCustomerNotified()
public
setPaypalIpnCustomerNotified(int|null $value) : static
Parameters
- $value : int|null
Return values
staticsetProtectCode()
public
setProtectCode(string|null $value) : static
Parameters
- $value : string|null
Return values
staticsetQuote()
public
setQuote(Mage_Sales_Model_Quote|null $value) : static
Parameters
- $value : Mage_Sales_Model_Quote|null
Return values
staticsetQuoteAddressId()
public
setQuoteAddressId(int|null $value) : static
Parameters
- $value : int|null
Return values
staticsetQuoteId()
public
setQuoteId(int|null $value) : static
Parameters
- $value : int|null
Return values
staticsetRelationChildId()
public
setRelationChildId(string|null $value) : static
Parameters
- $value : string|null
Return values
staticsetRelationChildRealId()
public
setRelationChildRealId(string|null $value) : static
Parameters
- $value : string|null
Return values
staticsetRelationParentId()
public
setRelationParentId(string|null $value) : static
Parameters
- $value : string|null
Return values
staticsetRelationParentRealId()
public
setRelationParentRealId(string|null $value) : static
Parameters
- $value : string|null
Return values
staticsetRemoteIp()
public
setRemoteIp(string|null $value) : static
Parameters
- $value : string|null
Return values
staticsetShippingAddress()
Declare order shipping address
public
setShippingAddress(Mage_Sales_Model_Order_Address $address) : $this
Parameters
- $address : Mage_Sales_Model_Order_Address
Return values
$thissetShippingAddressId()
public
setShippingAddressId(int|null $value) : static
Parameters
- $value : int|null
Return values
staticsetShippingAmount()
public
setShippingAmount(float|null $value) : static
Parameters
- $value : float|null
Return values
staticsetShippingCanceled()
public
setShippingCanceled(float|null $value) : static
Parameters
- $value : float|null
Return values
staticsetShippingDescription()
public
setShippingDescription(string|null $value) : static
Parameters
- $value : string|null
Return values
staticsetShippingDiscountAmount()
public
setShippingDiscountAmount(float|null $value) : static
Parameters
- $value : float|null
Return values
staticsetShippingHiddenTaxAmount()
public
setShippingHiddenTaxAmount(float|null $value) : static
Parameters
- $value : float|null
Return values
staticsetShippingInclTax()
public
setShippingInclTax(float|null $value) : static
Parameters
- $value : float|null
Return values
staticsetShippingInvoiced()
public
setShippingInvoiced(float|null $value) : static
Parameters
- $value : float|null
Return values
staticsetShippingMethod()
public
setShippingMethod(string|null $value) : static
Parameters
- $value : string|null
Return values
staticsetShippingRefunded()
public
setShippingRefunded(float|null $value) : static
Parameters
- $value : float|null
Return values
staticsetShippingTaxAmount()
public
setShippingTaxAmount(float|null $value) : static
Parameters
- $value : float|null
Return values
staticsetShippingTaxInvoiced()
public
setShippingTaxInvoiced(float|null $value) : static
Parameters
- $value : float|null
Return values
staticsetShippingTaxRefunded()
public
setShippingTaxRefunded(float|null $value) : static
Parameters
- $value : float|null
Return values
staticsetState()
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
$thissetStatus()
public
setStatus(string|null $value) : static
Parameters
- $value : string|null
Return values
staticsetStoreCurrencyCode()
public
setStoreCurrencyCode(string|null $value) : static
Parameters
- $value : string|null
Return values
staticsetStoreId()
public
setStoreId(int|null $value) : static
Parameters
- $value : int|null
Return values
staticsetStoreName()
public
setStoreName(string|null $value) : static
Parameters
- $value : string|null
Return values
staticsetStoreToBaseRate()
public
setStoreToBaseRate(float|null $value) : static
Parameters
- $value : float|null
Return values
staticsetStoreToOrderRate()
public
setStoreToOrderRate(float|null $value) : static
Parameters
- $value : float|null
Return values
staticsetSubtotal()
public
setSubtotal(float|null $value) : static
Parameters
- $value : float|null
Return values
staticsetSubtotalCanceled()
public
setSubtotalCanceled(float|null $value) : static
Parameters
- $value : float|null
Return values
staticsetSubtotalInclTax()
public
setSubtotalInclTax(float|null $value) : static
Parameters
- $value : float|null
Return values
staticsetSubtotalInvoiced()
public
setSubtotalInvoiced(float|null $value) : static
Parameters
- $value : float|null
Return values
staticsetSubtotalRefunded()
public
setSubtotalRefunded(float|null $value) : static
Parameters
- $value : float|null
Return values
staticsetTaxAmount()
public
setTaxAmount(float|null $value) : static
Parameters
- $value : float|null
Return values
staticsetTaxCanceled()
public
setTaxCanceled(float|null $value) : static
Parameters
- $value : float|null
Return values
staticsetTaxInvoiced()
public
setTaxInvoiced(float|null $value) : static
Parameters
- $value : float|null
Return values
staticsetTaxRefunded()
public
setTaxRefunded(float|null $value) : static
Parameters
- $value : float|null
Return values
staticsetTotalCanceled()
public
setTotalCanceled(float|null $value) : static
Parameters
- $value : float|null
Return values
staticsetTotalDue()
public
setTotalDue(float|null $value) : static
Parameters
- $value : float|null
Return values
staticsetTotalInvoiced()
public
setTotalInvoiced(float|null $value) : static
Parameters
- $value : float|null
Return values
staticsetTotalItemCount()
public
setTotalItemCount(int|null $value) : static
Parameters
- $value : int|null
Return values
staticsetTotalOfflineRefunded()
public
setTotalOfflineRefunded(float|null $value) : static
Parameters
- $value : float|null
Return values
staticsetTotalOnlineRefunded()
public
setTotalOnlineRefunded(float|null $value) : static
Parameters
- $value : float|null
Return values
staticsetTotalPaid()
public
setTotalPaid(float|null $value) : static
Parameters
- $value : float|null
Return values
staticsetTotalQtyOrdered()
public
setTotalQtyOrdered(float|null $value) : static
Parameters
- $value : float|null
Return values
staticsetTotalRefunded()
public
setTotalRefunded(float|null $value) : static
Parameters
- $value : float|null
Return values
staticsetTransactionId()
public
setTransactionId(string|null $value) : static
Parameters
- $value : string|null
Return values
staticsetUpdatedAt()
public
setUpdatedAt(string|null $value) : static
Parameters
- $value : string|null
Return values
staticsetWeight()
public
setWeight(float|null $value) : static
Parameters
- $value : float|null
Return values
staticsetXForwardedFor()
public
setXForwardedFor(string|null $value) : static
Parameters
- $value : string|null
Return values
statictoArray()
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
stringtoString()
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
stringtoXml()
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
stringunhold()
Attempt to unhold the order
public
unhold() : $this
Tags
Return values
$thisunsBillingAddressId()
public
unsBillingAddressId() : $this
Return values
$thisunsetData()
Clear order object data
public
unsetData([string $key = null ]) : $this
Parameters
- $key : string = null
-
data key
Attributes
- #[Override]
Return values
$thisunsetOldData()
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
$thisunsShippingAddressId()
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
_addPdfAttachment()
Attach a PDF copy of this document to the given email info, if it has a PDF form
protected
_addPdfAttachment(Mage_Core_Model_Email_Info $emailInfo) : void
Parameters
- $emailInfo : Mage_Core_Model_Email_Info
_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_beforeSave()
Processing object before save data
protected
_beforeSave() : Mage_Core_Model_Abstract
Attributes
- #[Override]
Return values
Mage_Core_Model_Abstract_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>_getItemsRandomCollection()
Get random items collection with or without related children
protected
_getItemsRandomCollection(int $limit[, bool $nonChildrenOnly = false ]) : Mage_Sales_Model_Resource_Order_Item_Collection
Parameters
- $limit : int
- $nonChildrenOnly : bool = false
Return values
Mage_Sales_Model_Resource_Order_Item_Collection_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
_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