Mage_Adminhtml_Model_Sales_Order_Create
extends DataObject
in package
implements
Mage_Checkout_Model_Cart_Interface
Order create model
Table of Contents
Interfaces
Properties
- $_cart : Mage_Sales_Model_Quote|null
- Sales Quote instance
- $_compareList : Mage_Catalog_Model_Product_Compare_List|false|null
- Catalog Compare List instance
- $_customer : Mage_Customer_Model_Customer
- Customer instance
- $_customerAddressForm : Mage_Customer_Model_Form|null
- Customer Address Form instance
- $_customerForm : Mage_Customer_Model_Form|null
- Customer Form instance
- $_data : array<string|int, mixed>|null
- Object attributes
- $_dirty : array<string|int, mixed>
- $_errors : array<string|int, mixed>
- Array of validate errors
- $_hasDataChanges : bool
- Data changes flag (true after setData|unsetData call)
- $_idFieldName : string
- Name of object id field
- $_isDeleted : bool
- Object delete flag
- $_isValidate : bool
- Collect (import) data and validate it flag
- $_needCollect : bool
- Re-collect quote flag
- $_needCollectCart : bool
- Re-collect cart flag
- $_oldFieldsMap : array<string|int, mixed>
- Map short fields names to its full names
- $_quote : Mage_Sales_Model_Quote
- Quote associated with the model
- $_session : Mage_Adminhtml_Model_Session_Quote
- Quote session object
- $_syncFieldsMap : mixed
- Map of fields to sync to other fields upon changing their data
- $_underscoreCache : array<string|int, mixed>
- Setter/Getter underscore transformation cache
- $_wishlist : Mage_Wishlist_Model_Wishlist|false|null
- Quote customer wishlist model object
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
- _prepareCustomer() : $this
- Prepare quote customer
- addData() : $this
- Add data to the object.
- addProduct() : Mage_Adminhtml_Model_Sales_Order_Create
- Add product to current order quote $product can be either product id or product model $config can be either buyRequest config, or just qty
- addProducts() : Mage_Adminhtml_Model_Sales_Order_Create|Exception
- Add multiple products to current order quote
- applyCoupon() : mixed
- applySidebarData() : $this
- Handle data sent from sidebar
- collectRates() : mixed
- collectShippingRates() : mixed
- Collect shipping data for quote shipping address
- createOrder() : Mage_Sales_Model_Order
- Create new order
- debug() : string|array<string|int, mixed>
- Present object data as string in debug mode
- flagDirty() : $this
- getBillingAddress() : Mage_Sales_Model_Quote_Address
- Retrieve quote billing address
- getCustomerCart() : Mage_Sales_Model_Quote
- Retrieve customer cart quote object model
- getCustomerCompareList() : Mage_Catalog_Model_Product_Compare_List
- Retrieve customer compare list model object
- getCustomerGroupId() : mixed
- getCustomerWishlist() : Mage_Wishlist_Model_Wishlist
- Retrieve customer wishlist model object
- getData() : mixed
- Object data getter
- getDataByKey() : mixed
- Get object data by particular key
- getDataByPath() : mixed
- Get object data by path
- getDataSetDefault() : mixed
- Fast get data or set default if value is not available
- getDataUsingMethod() : mixed
- Get object data by key with calling getter method
- getId() : mixed
- Retrieve object id
- getIdFieldName() : string
- Retrieve name of object id field
- getIsValidate() : bool
- Return is validate data in import flag
- getQuote() : Mage_Sales_Model_Quote
- Retrieve quote object model
- getSendConfirmation() : int
- getSession() : Mage_Adminhtml_Model_Session_Quote
- Retrieve session model object of quote
- getShippingAddress() : Mage_Sales_Model_Quote_Address
- Retrieve oreder quote shipping address
- 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
- importPostData() : Mage_Adminhtml_Model_Sales_Order_Create
- Parse data retrieved from request
- initFromOrder() : $this
- Initialize creation data from existing order
- initFromOrderItem() : Mage_Sales_Model_Quote_Item|string|$this
- Initialize creation data from existing order Item
- initRuleData() : $this
- Initialize data for price rules
- 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
- jsonSerialize() : array<string|int, mixed>
- Implementation of JsonSerializable::jsonSerialize()
- moveQuoteItem() : Mage_Adminhtml_Model_Sales_Order_Create
- Move quote item to another items list
- offsetExists() : bool
- Implementation of ArrayAccess::offsetExists()
- offsetGet() : mixed
- Implementation of ArrayAccess::offsetGet()
- offsetSet() : void
- Implementation of ArrayAccess::offsetSet()
- offsetUnset() : void
- Implementation of ArrayAccess::offsetUnset()
- recollectCart() : Mage_Adminhtml_Model_Sales_Order_Create
- Recollect totals for customer cart.
- removeItem() : Mage_Adminhtml_Model_Sales_Order_Create
- Remove item from some of customer items storage (shopping cart, wishlist etc.)
- removeQuoteItem() : Mage_Adminhtml_Model_Sales_Order_Create
- Remove quote item
- resetShippingMethod() : mixed
- saveQuote() : $this
- Quote saving
- serialize() : string
- serialize object attributes
- setAccountData() : mixed
- setBillingAddress() : $this
- setData() : $this
- Overwrite data in the object.
- setDataChanges() : $this
- Clears data changes status
- setDataUsingMethod() : $this
- Set object data with calling setter method
- setId() : $this
- Set object id field value
- setIdFieldName() : $this
- set name of object id field
- setIsValidate() : $this
- Set validate data in import data flag
- setPaymentData() : mixed
- setPaymentMethod() : mixed
- setQuote() : $this
- Set quote object
- setRecollect() : Mage_Adminhtml_Model_Sales_Order_Create
- Set collect totals flag for quote
- setShippingAddress() : $this
- setShippingAsBilling() : mixed
- setShippingMethod() : mixed
- toArray() : array<string|int, mixed>
- Public wrapper for __toArray
- toJson() : string
- Public wrapper for __toJson
- toString() : string
- Public wrapper for __toString
- toXml() : string
- Public wrapper for __toXml
- unsetData() : $this
- Unset data from the object.
- unsetOldData() : $this
- Unset old fields data from the object.
- updateQuoteItems() : Mage_Adminhtml_Model_Sales_Order_Create
- Update quantity of order quote items
- __toJson() : string
- Convert object attributes to JSON
- __toXml() : string
- Convert object attributes to XML
- _addFullNames() : mixed
- _assignOptionsToItem() : $this
- Assign options to item
- _camelize() : string
- _construct() : void
- Internal constructor not depended on params. Can be used for object initialization
- _customerIsInStore() : bool
- Check whether we need to create new customer (for another website) during order creation
- _getCustomerAddressForm() : Mage_Customer_Model_Form
- Return Customer Address Form instance
- _getCustomerForm() : Mage_Customer_Model_Form
- Return Customer (Checkout) Form instance
- _getData() : mixed
- Get value from _data array without parse key
- _getNewCustomerEmail() : string
- Retrieve new customer email
- _getQuoteItem() : Mage_Sales_Model_Quote_Item|false
- Retrieve quote item
- _initBillingAddressFromOrder() : mixed
- _initOldFieldsMap() : mixed
- Inits mapping array of object's previously used fields to new fields.
- _initShippingAddressFromOrder() : mixed
- _parseCustomPrice() : mixed
- _parseOptions() : array<string|int, mixed>
- Parse additional options and sync them with product options
- _prepareArray() : array<string|int, mixed>
- Set required array elements
- _prepareOptionsForRequest() : array<string|int, mixed>
- Prepare options array for info buy request
- _prepareQuoteItems() : mixed
- Prepare item options
- _prepareSyncFieldsMap() : $this
- Called after old fields are inited. Forms synchronization map to sync old fields and new fields between each other.
- _setCustomerData() : $this
- Set and validate Customer data
- _setQuoteAddress() : $this
- Set and validate Quote address All errors added to _errors
- _underscore() : string
- Converts field names for setters and getters
- _validate() : $this
- Validate quote data before order creation
Properties
$_cart
Sales Quote instance
protected
Mage_Sales_Model_Quote|null
$_cart
$_compareList
Catalog Compare List instance
protected
Mage_Catalog_Model_Product_Compare_List|false|null
$_compareList
$_customer
Customer instance
protected
Mage_Customer_Model_Customer
$_customer
$_customerAddressForm
Customer Address Form instance
protected
Mage_Customer_Model_Form|null
$_customerAddressForm
$_customerForm
Customer Form instance
protected
Mage_Customer_Model_Form|null
$_customerForm
$_data
Object attributes
protected
array<string|int, mixed>|null
$_data
= []
$_dirty
protected
array<string|int, mixed>
$_dirty
$_errors
Array of validate errors
protected
array<string|int, mixed>
$_errors
= []
$_hasDataChanges
Data changes flag (true after setData|unsetData call)
protected
bool
$_hasDataChanges
= false
$_idFieldName
Name of object id field
protected
string
$_idFieldName
= null
$_isDeleted
Object delete flag
protected
bool
$_isDeleted
= false
$_isValidate
Collect (import) data and validate it flag
protected
bool
$_isValidate
= \false
$_needCollect
Re-collect quote flag
protected
bool
$_needCollect
$_needCollectCart
Re-collect cart flag
protected
bool
$_needCollectCart
= \false
$_oldFieldsMap
Map short fields names to its full names
protected
array<string|int, mixed>
$_oldFieldsMap
= []
$_quote
Quote associated with the model
protected
Mage_Sales_Model_Quote
$_quote
$_session
Quote session object
protected
Mage_Adminhtml_Model_Session_Quote
$_session
$_syncFieldsMap
Map of fields to sync to other fields upon changing their data
protected
mixed
$_syncFieldsMap
= []
$_underscoreCache
Setter/Getter underscore transformation cache
protected
static array<string|int, mixed>
$_underscoreCache
= []
$_wishlist
Quote customer wishlist model object
protected
Mage_Wishlist_Model_Wishlist|false|null
$_wishlist
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>_prepareCustomer()
Prepare quote customer
public
_prepareCustomer() : $this
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
$thisaddProduct()
Add product to current order quote $product can be either product id or product model $config can be either buyRequest config, or just qty
public
addProduct(int|Mage_Catalog_Model_Product $product[, float|array<string|int, mixed>|DataObject $config = 1 ]) : Mage_Adminhtml_Model_Sales_Order_Create
Parameters
- $product : int|Mage_Catalog_Model_Product
- $config : float|array<string|int, mixed>|DataObject = 1
Attributes
- #[Override]
Return values
Mage_Adminhtml_Model_Sales_Order_CreateaddProducts()
Add multiple products to current order quote
public
addProducts(array<string|int, mixed> $products) : Mage_Adminhtml_Model_Sales_Order_Create|Exception
Parameters
- $products : array<string|int, mixed>
Return values
Mage_Adminhtml_Model_Sales_Order_Create|ExceptionapplyCoupon()
public
applyCoupon(mixed $code) : mixed
Parameters
- $code : mixed
applySidebarData()
Handle data sent from sidebar
public
applySidebarData(array<string|int, mixed> $data) : $this
Parameters
- $data : array<string|int, mixed>
Return values
$thiscollectRates()
public
collectRates() : mixed
collectShippingRates()
Collect shipping data for quote shipping address
public
collectShippingRates() : mixed
createOrder()
Create new order
public
createOrder() : Mage_Sales_Model_Order
Return values
Mage_Sales_Model_Orderdebug()
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>flagDirty()
public
flagDirty(string $field[, bool $flag = true ]) : $this
Parameters
- $field : string
- $flag : bool = true
Return values
$thisgetBillingAddress()
Retrieve quote billing address
public
getBillingAddress() : Mage_Sales_Model_Quote_Address
Return values
Mage_Sales_Model_Quote_AddressgetCustomerCart()
Retrieve customer cart quote object model
public
getCustomerCart() : Mage_Sales_Model_Quote
Return values
Mage_Sales_Model_QuotegetCustomerCompareList()
Retrieve customer compare list model object
public
getCustomerCompareList() : Mage_Catalog_Model_Product_Compare_List
Return values
Mage_Catalog_Model_Product_Compare_ListgetCustomerGroupId()
public
getCustomerGroupId() : mixed
getCustomerWishlist()
Retrieve customer wishlist model object
public
getCustomerWishlist([mixed $cacheReload = false ]) : Mage_Wishlist_Model_Wishlist
Parameters
- $cacheReload : mixed = false
Tags
Return values
Mage_Wishlist_Model_WishlistgetData()
Object data getter
public
getData([string $key = '' ][, string|int $index = null ]) : mixed
If $key is not defined will return all the data as an array. Otherwise, it will return value of the element specified by $key. It is possible to use keys like a/b/c for access nested array data
If $index is specified it will assume that attribute data is an array and retrieve corresponding member. If data is the string - it will be explode by new line character and converted to array.
Parameters
- $key : string = ''
- $index : string|int = null
getDataByKey()
Get object data by particular key
public
getDataByKey(string $key) : mixed
Parameters
- $key : string
getDataByPath()
Get object data by path
public
getDataByPath(string $path) : mixed
Method consider the path as chain of keys: a/b/c => ['a']['b']['c']
Parameters
- $path : string
getDataSetDefault()
Fast get data or set default if value is not available
public
getDataSetDefault(string $key, mixed $default) : mixed
Parameters
- $key : string
- $default : mixed
getDataUsingMethod()
Get object data by key with calling getter method
public
getDataUsingMethod(string $key[, mixed $args = null ]) : mixed
Parameters
- $key : string
- $args : mixed = null
getId()
Retrieve object id
public
getId() : mixed
getIdFieldName()
Retrieve name of object id field
public
getIdFieldName() : string
Return values
stringgetIsValidate()
Return is validate data in import flag
public
getIsValidate() : bool
Return values
boolgetQuote()
Retrieve quote object model
public
getQuote() : Mage_Sales_Model_Quote
Attributes
- #[Override]
Return values
Mage_Sales_Model_QuotegetSendConfirmation()
public
getSendConfirmation() : int
Return values
intgetSession()
Retrieve session model object of quote
public
getSession() : Mage_Adminhtml_Model_Session_Quote
Return values
Mage_Adminhtml_Model_Session_QuotegetShippingAddress()
Retrieve oreder quote shipping address
public
getShippingAddress() : Mage_Sales_Model_Quote_Address
Return values
Mage_Sales_Model_Quote_AddresshasData()
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
boolimportPostData()
Parse data retrieved from request
public
importPostData(array<string|int, mixed> $data) : Mage_Adminhtml_Model_Sales_Order_Create
Parameters
- $data : array<string|int, mixed>
Return values
Mage_Adminhtml_Model_Sales_Order_CreateinitFromOrder()
Initialize creation data from existing order
public
initFromOrder(Mage_Sales_Model_Order $order) : $this
Parameters
- $order : Mage_Sales_Model_Order
Return values
$thisinitFromOrderItem()
Initialize creation data from existing order Item
public
initFromOrderItem(Mage_Sales_Model_Order_Item $orderItem[, int $qty = null ]) : Mage_Sales_Model_Quote_Item|string|$this
Parameters
- $orderItem : Mage_Sales_Model_Order_Item
- $qty : int = null
Return values
Mage_Sales_Model_Quote_Item|string|$thisinitRuleData()
Initialize data for price rules
public
initRuleData() : $this
Return values
$thisisDeleted()
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
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>moveQuoteItem()
Move quote item to another items list
public
moveQuoteItem(int|Mage_Sales_Model_Quote_Item $item, string $moveTo, int $qty) : Mage_Adminhtml_Model_Sales_Order_Create
Parameters
- $item : int|Mage_Sales_Model_Quote_Item
- $moveTo : string
- $qty : int
Return values
Mage_Adminhtml_Model_Sales_Order_CreateoffsetExists()
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]
recollectCart()
Recollect totals for customer cart.
public
recollectCart() : Mage_Adminhtml_Model_Sales_Order_Create
Set recollect totals flag for quote
Return values
Mage_Adminhtml_Model_Sales_Order_CreateremoveItem()
Remove item from some of customer items storage (shopping cart, wishlist etc.)
public
removeItem(int $itemId, string $from) : Mage_Adminhtml_Model_Sales_Order_Create
Parameters
- $itemId : int
- $from : string
Return values
Mage_Adminhtml_Model_Sales_Order_CreateremoveQuoteItem()
Remove quote item
public
removeQuoteItem(int $item) : Mage_Adminhtml_Model_Sales_Order_Create
Parameters
- $item : int
Return values
Mage_Adminhtml_Model_Sales_Order_CreateresetShippingMethod()
public
resetShippingMethod() : mixed
saveQuote()
Quote saving
public
saveQuote() : $this
Attributes
- #[Override]
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
stringsetAccountData()
public
setAccountData(mixed $accountData) : mixed
Parameters
- $accountData : mixed
setBillingAddress()
public
setBillingAddress(array<string|int, mixed>|Mage_Sales_Model_Quote_Address $address) : $this
Parameters
- $address : array<string|int, mixed>|Mage_Sales_Model_Quote_Address
Return values
$thissetData()
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
$thissetId()
Set object id field value
public
setId(mixed $value) : $this
Parameters
- $value : mixed
Return values
$thissetIdFieldName()
set name of object id field
public
setIdFieldName(string $name) : $this
Parameters
- $name : string
Return values
$thissetIsValidate()
Set validate data in import data flag
public
setIsValidate(bool $flag) : $this
Parameters
- $flag : bool
Return values
$thissetPaymentData()
public
setPaymentData(mixed $data) : mixed
Parameters
- $data : mixed
setPaymentMethod()
public
setPaymentMethod(mixed $method) : mixed
Parameters
- $method : mixed
setQuote()
Set quote object
public
setQuote(Mage_Sales_Model_Quote $quote) : $this
Parameters
- $quote : Mage_Sales_Model_Quote
Attributes
- #[Override]
Return values
$thissetRecollect()
Set collect totals flag for quote
public
setRecollect(bool $flag) : Mage_Adminhtml_Model_Sales_Order_Create
Parameters
- $flag : bool
Return values
Mage_Adminhtml_Model_Sales_Order_CreatesetShippingAddress()
public
setShippingAddress(array<string|int, mixed>|Mage_Sales_Model_Quote_Address $address) : $this
Parameters
- $address : array<string|int, mixed>|Mage_Sales_Model_Quote_Address
Return values
$thissetShippingAsBilling()
public
setShippingAsBilling(mixed $flag) : mixed
Parameters
- $flag : mixed
setShippingMethod()
public
setShippingMethod(mixed $method) : mixed
Parameters
- $method : mixed
toArray()
Public wrapper for __toArray
public
toArray([array<string|int, mixed> $arrAttributes = [] ]) : array<string|int, mixed>
Parameters
- $arrAttributes : array<string|int, mixed> = []
Return values
array<string|int, mixed>toJson()
Public wrapper for __toJson
public
toJson([array<string|int, mixed> $arrAttributes = [] ]) : string
Parameters
- $arrAttributes : array<string|int, mixed> = []
Return values
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
stringunsetData()
Unset data from the object.
public
unsetData([string $key = null ]) : $this
$key can be a string only. Array will be ignored.
Parameters
- $key : string = null
Return values
$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
$thisupdateQuoteItems()
Update quantity of order quote items
public
updateQuoteItems(array<string|int, mixed> $data) : Mage_Adminhtml_Model_Sales_Order_Create
Parameters
- $data : array<string|int, mixed>
Return values
Mage_Adminhtml_Model_Sales_Order_Create__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
_assignOptionsToItem()
Assign options to item
protected
_assignOptionsToItem(Mage_Sales_Model_Quote_Item $item, array<string|int, mixed> $options) : $this
Parameters
- $item : Mage_Sales_Model_Quote_Item
- $options : array<string|int, mixed>
Return values
$this_camelize()
protected
_camelize(string $name) : string
Parameters
- $name : string
Return values
string_construct()
Internal constructor not depended on params. Can be used for object initialization
protected
_construct() : void
_customerIsInStore()
Check whether we need to create new customer (for another website) during order creation
protected
_customerIsInStore(Mage_Core_Model_Store $store) : bool
Parameters
- $store : Mage_Core_Model_Store
Return values
bool_getCustomerAddressForm()
Return Customer Address Form instance
protected
_getCustomerAddressForm() : Mage_Customer_Model_Form
Return values
Mage_Customer_Model_Form_getCustomerForm()
Return Customer (Checkout) Form instance
protected
_getCustomerForm() : Mage_Customer_Model_Form
Return values
Mage_Customer_Model_Form_getData()
Get value from _data array without parse key
protected
_getData(string $key) : mixed
Parameters
- $key : string
_getNewCustomerEmail()
Retrieve new customer email
protected
_getNewCustomerEmail(Mage_Customer_Model_Customer $customer) : string
Parameters
- $customer : Mage_Customer_Model_Customer
Return values
string_getQuoteItem()
Retrieve quote item
protected
_getQuoteItem(int|Mage_Sales_Model_Quote_Item $item) : Mage_Sales_Model_Quote_Item|false
Parameters
- $item : int|Mage_Sales_Model_Quote_Item
Return values
Mage_Sales_Model_Quote_Item|false_initBillingAddressFromOrder()
protected
_initBillingAddressFromOrder(Mage_Sales_Model_Order $order) : mixed
Parameters
- $order : Mage_Sales_Model_Order
_initOldFieldsMap()
Inits mapping array of object's previously used fields to new fields.
protected
_initOldFieldsMap() : mixed
Must be overloaded by descendants to set concrete fields map.
_initShippingAddressFromOrder()
protected
_initShippingAddressFromOrder(Mage_Sales_Model_Order $order) : mixed
Parameters
- $order : Mage_Sales_Model_Order
_parseCustomPrice()
protected
_parseCustomPrice(mixed $price) : mixed
Parameters
- $price : mixed
_parseOptions()
Parse additional options and sync them with product options
protected
_parseOptions(Mage_Sales_Model_Quote_Item $item, string $additionalOptions) : array<string|int, mixed>
Parameters
- $item : Mage_Sales_Model_Quote_Item
- $additionalOptions : string
Return values
array<string|int, mixed>_prepareArray()
Set required array elements
protected
_prepareArray(array<string|int, mixed> &$arr[, array<string|int, mixed> $elements = [] ]) : array<string|int, mixed>
Parameters
- $arr : array<string|int, mixed>
- $elements : array<string|int, mixed> = []
Return values
array<string|int, mixed>_prepareOptionsForRequest()
Prepare options array for info buy request
protected
_prepareOptionsForRequest(Mage_Sales_Model_Quote_Item $item) : array<string|int, mixed>
Parameters
- $item : Mage_Sales_Model_Quote_Item
Return values
array<string|int, mixed>_prepareQuoteItems()
Prepare item options
protected
_prepareQuoteItems() : 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_setCustomerData()
Set and validate Customer data
protected
_setCustomerData(Mage_Customer_Model_Customer $customer) : $this
Parameters
- $customer : Mage_Customer_Model_Customer
Return values
$this_setQuoteAddress()
Set and validate Quote address All errors added to _errors
protected
_setQuoteAddress(Mage_Sales_Model_Quote_Address $address, array<string|int, mixed> $data) : $this
Parameters
- $address : Mage_Sales_Model_Quote_Address
- $data : array<string|int, mixed>
Return values
$this_underscore()
Converts field names for setters and getters
protected
_underscore(string $name) : string
$this->setMyField($value) === $this->setData('my_field', $value) Uses cache to eliminate unnecessary preg_replace
Parameters
- $name : string
Return values
string_validate()
Validate quote data before order creation
protected
_validate() : $this