Bitrix API

Order extends OrderBase implements IShipmentOrder, IPaymentOrder, IBusinessValueProvider

Class Order

Table of Contents

Interfaces

IShipmentOrder
Bitrix Framework
IPaymentOrder
Bitrix Framework
IBusinessValueProvider

Constants

SALE_ORDER_CALC_TYPE_CHANGE  = 'C'
SALE_ORDER_CALC_TYPE_NEW  = 'N'
SALE_ORDER_CALC_TYPE_REFRESH  = 'R'
SALE_ORDER_LOCK_STATUS_GREEN  = 'green'
SALE_ORDER_LOCK_STATUS_RED  = 'red'
SALE_ORDER_LOCK_STATUS_YELLOW  = 'yellow'

Methods

addPrintedCheck()  : mixed
Add printed check to order
appendBasket()  : Result
Append basket to order
changeCurrency()  : Result
Change order currency.
clearStartField()  : void
Reset order flags: \Bitrix\Sale\OrderBase::$isStartField, \Bitrix\Sale\OrderBase::$isMeaningfulField
create()  : static
Create \Bitrix\Sale\OrderBase object
createClone()  : OrderBase
Create order clone
delete()  : Result
Delete order
doFinalAction()  : Result
getAllFields()  : array<string|int, mixed>
getAvailableFields()  : array<string|int, mixed>
Return field names that can set in \Bitrix\Sale\OrderBase::setField
getAvailableFieldsMap()  : array<string|int, mixed>|null
getBasePrice()  : float
Returns order price without discounts.
getBasket()  : BasketBase
Return order basket.
getBusinessValueProviderInstance()  : Order|null|string
getCalculateType()  : null|string
Return value: OrderBase::SALE_ORDER_CALC_TYPE_REFRESH, OrderBase::SALE_ORDER_CALC_TYPE_CHANGE, OrderBase::SALE_ORDER_CALC_TYPE_NEW
getClassName()  : string
getCurrency()  : string
Return currency
getCustomizableFields()  : array<string|int, mixed>
getDateInsert()  : mixed
Return date order insert
getDeliveryIdList()  : array<string|int, mixed>
getDeliveryLocation()  : float
getDeliveryPrice()  : float
getDeliverySystemId()  : array<string|int, mixed>
getDiscount()  : Discount
Return discount object
getDiscountPrice()  : float
Return discount price
getField()  : null|string
Return field value
getFieldsDescription()  : array<string|int, mixed>
getFieldValues()  : array<string|int, mixed>
getHash()  : mixed
Return order hash
getId()  : int
getInternalId()  : int
Return internal index of order
getList()  : Result
Get order information
getLockedStatus()  : Result
Return order locked status.
getPaymentCollection()  : PaymentCollection
Return payment collection
getPaymentSystemId()  : array<string|int, mixed>
getPaySystemIdList()  : array<string|int, mixed>
getPersonTypeId()  : int
Return person type id of order
getPrice()  : float
Return order price
getPrintedChecks()  : array<string|int, mixed>
Return printed check list
getPropertyCollection()  : PropertyValueCollectionBase
getRegistryEntity()  : string
getRegistryType()  : string
getSettableFields()  : mixed
getShipmentCollection()  : ShipmentCollection
Return shipment collection
getSiteId()  : null|string
Return site id
getSumPaid()  : float
Return paid sum
getTax()  : Tax
Get the entity of taxes
getTaxLocation()  : null|string
Return tax location
getTaxPrice()  : float
getTaxValue()  : float
getTradeBindingCollection()  : TradeBindingCollection
Return trade binding collection
getUfId()  : null|string
Return user field id
getUserId()  : int
Return user id
getVatRate()  : mixed|null
Return order vat rate
getVatSum()  : float
Return order vat sum
hasMeaningfulField()  : bool
isAllowDelivery()  : bool
Return TRUE, if order is allowed delivery. Else return FALSE
isAllowPay()  : bool
isCanceled()  : bool
Return TRUE, if order is canceled. Else return FALSE
isChanged()  : bool
Return TRUE if order is changed. Else return FALSE
isClone()  : bool
Return TRUE, if this order is cloned. Else return FALSE
isDeducted()  : bool
Return TRUE, if order is deducted. Else return FALSE
isExternal()  : bool
Return TRUE if order is external. Else return FALSE
isLocked()  : bool
Return TRUE if order is locked.
isMarked()  : null|string
Return TRUE if order has problems. Else return FALSE
isMarkedFieldCustom()  : bool
isMathActionOnly()  : bool
Return TRUE if calculations are based on current values. Data from the provider is not requested. Else return false
isPaid()  : bool
Return TRUE, if order is payed. Else return FALSE
isSaveRunning()  : bool
isShipped()  : bool
Return TRUE if order is deducted. Else return FALSE
isStartField()  : bool
isUsedVat()  : bool
Return TRUE if VAT is used. Else return FALSE
load()  : null|static
Load order object by id
loadByAccountNumber()  : mixed|null
Load object order by account number
loadByFilter()  : array<string|int, mixed>|null
Return object order list satisfying filter
loadPaymentCollection()  : PaymentCollection
Load payment collection
loadPropertyCollection()  : PropertyValueCollectionBase
loadShipmentCollection()  : ShipmentCollection
Load shipment collection
lock()  : UpdateResult|Result
Lock order.
markFieldCustom()  : mixed
onAfterBasketRefresh()  : Result
onBasketModify()  : Result
Modify basket.
onBeforeBasketRefresh()  : Result
onPaymentCollectionModify()  : Result
onShipmentCollectionModify()  : Result
Modify shipment collection.
onTradeBindingCollectionModify()  : mixed
refreshData()  : Result
Full order refresh
resetData()  : mixed
save()  : Result
Save order
setBasket()  : Result
Append basket to order and refresh it
setField()  : Result
Set value with call events on field modify
setFields()  : Result
setPersonTypeId()  : Result
Set person type id of order
setVatDelivery()  : mixed
Set VAT delivery sum
setVatSum()  : mixed
Set VAT sum
toArray()  : array<string|int, mixed>
unlock()  : UpdateResult|Result
Unlock order.
unmarkFieldCustom()  : mixed
verify()  : Result
Verify object to correctness

Constants

SALE_ORDER_CALC_TYPE_CHANGE

public mixed SALE_ORDER_CALC_TYPE_CHANGE = 'C'

SALE_ORDER_CALC_TYPE_NEW

public mixed SALE_ORDER_CALC_TYPE_NEW = 'N'

SALE_ORDER_CALC_TYPE_REFRESH

public mixed SALE_ORDER_CALC_TYPE_REFRESH = 'R'

SALE_ORDER_LOCK_STATUS_GREEN

public mixed SALE_ORDER_LOCK_STATUS_GREEN = 'green'

SALE_ORDER_LOCK_STATUS_RED

public mixed SALE_ORDER_LOCK_STATUS_RED = 'red'

SALE_ORDER_LOCK_STATUS_YELLOW

public mixed SALE_ORDER_LOCK_STATUS_YELLOW = 'yellow'

Methods

addPrintedCheck()

Add printed check to order

public addPrintedCheck(mixed $check) : mixed
Parameters
$check : mixed

appendBasket()

Append basket to order

public appendBasket(BasketBase $basket) : Result
Parameters
$basket : BasketBase
Tags
throws
ArgumentException
throws
ArgumentNullException
throws
ArgumentOutOfRangeException
throws
NotSupportedException
throws
ObjectNotFoundException
Return values
Result

changeCurrency()

Change order currency.

public changeCurrency(string $currency) : Result
Parameters
$currency : string
Tags
throws
ArgumentNullException

if currency empty

Return values
Result

clearStartField()

Reset order flags: \Bitrix\Sale\OrderBase::$isStartField, \Bitrix\Sale\OrderBase::$isMeaningfulField

public clearStartField() : void

create()

Create \Bitrix\Sale\OrderBase object

public static create(mixed $siteId[, null $userId = null ][, null $currency = null ]) : static
Parameters
$siteId : mixed
$userId : null = null
$currency : null = null
Tags
throws
ArgumentOutOfRangeException
throws
NotImplementedException
throws
ObjectException
Return values
static

createClone()

Create order clone

public createClone() : OrderBase
Tags
throws
ArgumentException
throws
NotImplementedException
throws
SystemException
Return values
OrderBase

delete()

Delete order

public static delete(int $id) : Result
Parameters
$id : int

Order id.

Tags
throws
ArgumentNullException
Return values
Result

doFinalAction()

public doFinalAction([bool $hasMeaningfulField = false ]) : Result
Parameters
$hasMeaningfulField : bool = false
Tags
throws
ArgumentNullException
throws
ObjectNotFoundException
Return values
Result

getAllFields()

public static getAllFields() : array<string|int, mixed>
Tags
throws
NotImplementedException
Return values
array<string|int, mixed>

getAvailableFields()

Return field names that can set in \Bitrix\Sale\OrderBase::setField

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

getAvailableFieldsMap()

public static getAvailableFieldsMap() : array<string|int, mixed>|null
Tags
throws
NotImplementedException
Return values
array<string|int, mixed>|null

getBasePrice()

Returns order price without discounts.

public getBasePrice() : float
Return values
float

getBusinessValueProviderInstance()

public getBusinessValueProviderInstance(mixed $mapping) : Order|null|string
Parameters
$mapping : mixed
Return values
Order|null|string

getCalculateType()

Return value: OrderBase::SALE_ORDER_CALC_TYPE_REFRESH, OrderBase::SALE_ORDER_CALC_TYPE_CHANGE, OrderBase::SALE_ORDER_CALC_TYPE_NEW

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

getClassName()

public static getClassName() : string
Return values
string

getCurrency()

Return currency

public getCurrency() : string
Return values
string

getCustomizableFields()

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

getDateInsert()

Return date order insert

public getDateInsert() : mixed

getDeliveryIdList()

public getDeliveryIdList() : array<string|int, mixed>
Tags
throws
ArgumentException
throws
ArgumentNullException
Return values
array<string|int, mixed>

getDeliveryLocation()

public getDeliveryLocation() : float
Return values
float

getDeliveryPrice()

public getDeliveryPrice() : float
Return values
float

getDeliverySystemId()

public getDeliverySystemId() : array<string|int, mixed>
Tags
throws
ObjectNotFoundException
Return values
array<string|int, mixed>

getDiscountPrice()

Return discount price

public getDiscountPrice() : float
Return values
float

getField()

Return field value

public getField(mixed $name) : null|string
Parameters
$name : mixed
Return values
null|string

getFieldsDescription()

public static getFieldsDescription() : array<string|int, mixed>
Tags
throws
NotImplementedException
Return values
array<string|int, mixed>

getFieldValues()

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

getHash()

Return order hash

public getHash() : mixed

getId()

public getId() : int
Return values
int

getInternalId()

Return internal index of order

public getInternalId() : int
Return values
int

getList()

Get order information

public static getList([array<string|int, mixed> $parameters = array() ]) : Result
Parameters
$parameters : array<string|int, mixed> = array()
Tags
throws
ArgumentException
Return values
Result

getLockedStatus()

Return order locked status.

public static getLockedStatus(int $id) : Result
Parameters
$id : int

Order id.

Tags
throws
ArgumentException
Return values
Result

getPaymentCollection()

Return payment collection

public getPaymentCollection() : PaymentCollection
Return values
PaymentCollection

getPaymentSystemId()

public getPaymentSystemId() : array<string|int, mixed>
Tags
throws
ObjectNotFoundException
Return values
array<string|int, mixed>

getPaySystemIdList()

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

getPersonTypeId()

Return person type id of order

public getPersonTypeId() : int
Return values
int

getPrice()

Return order price

public getPrice() : float
Return values
float

getPrintedChecks()

Return printed check list

public getPrintedChecks() : array<string|int, mixed>
Tags
throws
ArgumentException
Return values
array<string|int, mixed>

getRegistryEntity()

public static getRegistryEntity() : string
Return values
string

getRegistryType()

public static getRegistryType() : string
Return values
string

getSettableFields()

public static getSettableFields() : mixed

Use \Bitrix\Sale\OrderBase::getAvailableFields instead

Tags
returns

array

getSiteId()

Return site id

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

getSumPaid()

Return paid sum

public getSumPaid() : float
Return values
float

getTax()

Get the entity of taxes

public getTax() : Tax
Return values
Tax

getTaxLocation()

Return tax location

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

getTaxPrice()

public getTaxPrice() : float
Return values
float

getTaxValue()

public getTaxValue() : float
Return values
float

getTradeBindingCollection()

Return trade binding collection

public getTradeBindingCollection() : TradeBindingCollection
Tags
throws
ArgumentException
throws
ArgumentTypeException
throws
SystemException
Return values
TradeBindingCollection

getUfId()

Return user field id

public static getUfId() : null|string
Return values
null|string

getUserId()

Return user id

public getUserId() : int
Return values
int

getVatRate()

Return order vat rate

public getVatRate() : mixed|null
Return values
mixed|null

getVatSum()

Return order vat sum

public getVatSum() : float
Return values
float

hasMeaningfulField()

public hasMeaningfulField() : bool
Return values
bool

isAllowDelivery()

Return TRUE, if order is allowed delivery. Else return FALSE

public isAllowDelivery() : bool
Return values
bool

isAllowPay()

public isAllowPay() : bool

Use OrderStatus::isAllowPay instead

Tags
throws
ArgumentException
throws
ArgumentNullException
throws
ArgumentOutOfRangeException
throws
NotImplementedException
Return values
bool

isCanceled()

Return TRUE, if order is canceled. Else return FALSE

public isCanceled() : bool
Return values
bool

isChanged()

Return TRUE if order is changed. Else return FALSE

public isChanged() : bool
Return values
bool

isClone()

Return TRUE, if this order is cloned. Else return FALSE

public isClone() : bool
Return values
bool

isDeducted()

Return TRUE, if order is deducted. Else return FALSE

public isDeducted() : bool
Return values
bool

isExternal()

Return TRUE if order is external. Else return FALSE

public isExternal() : bool
Return values
bool

isLocked()

Return TRUE if order is locked.

public static isLocked(int $id) : bool
Parameters
$id : int
Return values
bool

isMarked()

Return TRUE if order has problems. Else return FALSE

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

isMarkedFieldCustom()

public isMarkedFieldCustom(string $name) : bool
Parameters
$name : string
Return values
bool

isMathActionOnly()

Return TRUE if calculations are based on current values. Data from the provider is not requested. Else return false

public isMathActionOnly() : bool
Return values
bool

isPaid()

Return TRUE, if order is payed. Else return FALSE

public isPaid() : bool
Return values
bool

isSaveRunning()

public isSaveRunning() : bool
Return values
bool

isShipped()

Return TRUE if order is deducted. Else return FALSE

public isShipped() : bool
Return values
bool

isStartField()

public isStartField([bool $isMeaningfulField = false ]) : bool
Parameters
$isMeaningfulField : bool = false
Return values
bool

isUsedVat()

Return TRUE if VAT is used. Else return FALSE

public isUsedVat() : bool
Return values
bool

load()

Load order object by id

public static load(int $id) : null|static
Parameters
$id : int
Tags
throws
ArgumentNullException
Return values
null|static

loadByAccountNumber()

Load object order by account number

public static loadByAccountNumber(mixed $value) : mixed|null
Parameters
$value : mixed
Tags
throws
ArgumentException
throws
ArgumentNullException
throws
NotImplementedException
Return values
mixed|null

loadByFilter()

Return object order list satisfying filter

public static loadByFilter(array<string|int, mixed> $parameters) : array<string|int, mixed>|null
Parameters
$parameters : array<string|int, mixed>
Tags
throws
ArgumentException
throws
NotImplementedException
Return values
array<string|int, mixed>|null

loadPaymentCollection()

Load payment collection

public loadPaymentCollection() : PaymentCollection
Tags
throws
ArgumentException
Return values
PaymentCollection

lock()

Lock order.

public static lock(int $id) : UpdateResult|Result
Parameters
$id : int

Order id.

Tags
throws
Exception
Return values
UpdateResult|Result

markFieldCustom()

public markFieldCustom(string $name) : mixed
Parameters
$name : string
Tags
throws
ArgumentOutOfRangeException

onAfterBasketRefresh()

public onAfterBasketRefresh() : Result
Return values
Result

onBasketModify()

Modify basket.

public onBasketModify(string $action, BasketItemBase $basketItem[, null $name = null ][, null $oldValue = null ][, null $value = null ]) : Result
Parameters
$action : string
$basketItem : BasketItemBase
$name : null = null
$oldValue : null = null
$value : null = null
Tags
throws
ArgumentException
throws
ArgumentNullException
throws
ArgumentOutOfRangeException
throws
NotImplementedException
throws
NotSupportedException
throws
ObjectNotFoundException
throws
SystemException
Return values
Result

onBeforeBasketRefresh()

public onBeforeBasketRefresh() : Result
Return values
Result

onPaymentCollectionModify()

public onPaymentCollectionModify(mixed $action, Payment $payment[, null $name = null ][, null $oldValue = null ][, null $value = null ]) : Result
Parameters
$action : mixed
$payment : Payment
$name : null = null
$oldValue : null = null
$value : null = null
Tags
throws
ArgumentException
throws
ArgumentNullException
throws
ArgumentOutOfRangeException
throws
NotImplementedException
throws
ObjectNotFoundException
throws
SystemException
Return values
Result

onShipmentCollectionModify()

Modify shipment collection.

public onShipmentCollectionModify(mixed $action, Shipment $shipment[, null $name = null ][, null $oldValue = null ][, null $value = null ]) : Result
Parameters
$action : mixed
$shipment : Shipment
$name : null = null
$oldValue : null = null
$value : null = null
Tags
throws
ArgumentException
throws
ArgumentNullException
throws
ArgumentOutOfRangeException
throws
NotImplementedException
throws
NotSupportedException
throws
ObjectException
throws
ObjectNotFoundException
Return values
Result

onTradeBindingCollectionModify()

public onTradeBindingCollectionModify(mixed $action, TradeBindingEntity $entity[, mixed $name = null ][, mixed $oldValue = null ][, mixed $value = null ]) : mixed
Parameters
$action : mixed
$entity : TradeBindingEntity
$name : mixed = null
$oldValue : mixed = null
$value : mixed = null

refreshData()

Full order refresh

public refreshData() : Result
Tags
throws
ArgumentException
throws
ArgumentNullException
throws
ArgumentOutOfRangeException
throws
ObjectNotFoundException
Return values
Result

resetData()

public resetData([array<string|int, mixed> $select = array('PRICE') ]) : mixed
Parameters
$select : array<string|int, mixed> = array('PRICE')
Tags
throws
ArgumentException
throws
ArgumentNullException
throws
ArgumentOutOfRangeException

save()

Save order

public save() : Result
Tags
throws
ArgumentException
throws
ArgumentNullException
throws
ArgumentOutOfRangeException
throws
Exception
Return values
Result

setBasket()

Append basket to order and refresh it

public setBasket(BasketBase $basket) : Result
Parameters
$basket : BasketBase
Tags
throws
ArgumentException
throws
ArgumentNullException
throws
ArgumentOutOfRangeException
throws
NotSupportedException
throws
ObjectNotFoundException
Return values
Result

setField()

Set value with call events on field modify

public setField(mixed $name, mixed $value) : Result
Parameters
$name : mixed
$value : mixed
Tags
throws
ArgumentNullException
throws
ArgumentOutOfRangeException
throws
NotImplementedException
Return values
Result

setFields()

public setFields(array<string|int, mixed> $values) : Result
Parameters
$values : array<string|int, mixed>
Tags
throws
ArgumentOutOfRangeException
throws
NotSupportedException
throws
Exception
Return values
Result

setPersonTypeId()

Set person type id of order

public setPersonTypeId(mixed $personTypeId) : Result
Parameters
$personTypeId : mixed
Return values
Result

setVatDelivery()

Set VAT delivery sum

public setVatDelivery(mixed $price) : mixed
Parameters
$price : mixed

setVatSum()

Set VAT sum

public setVatSum(mixed $price) : mixed
Parameters
$price : mixed

toArray()

public toArray() : array<string|int, mixed>
Tags
throws
ArgumentException
throws
SystemException
Return values
array<string|int, mixed>

unlock()

Unlock order.

public static unlock(int $id) : UpdateResult|Result
Parameters
$id : int

Order id.

Tags
throws
ArgumentNullException
throws
Exception
Return values
UpdateResult|Result

unmarkFieldCustom()

public unmarkFieldCustom(string $name) : mixed
Parameters
$name : string
Tags
throws
ArgumentOutOfRangeException

verify()

Verify object to correctness

public verify() : Result
Tags
throws
ArgumentException
throws
ArgumentNullException
throws
ArgumentOutOfRangeException
throws
NotSupportedException
throws
ObjectNotFoundException
Return values
Result

        
On this page

Search results