Bitrix API

OrderBase extends Entity

AbstractYes

Class OrderBase

Table of Contents

Constants

SALE_ORDER_CALC_TYPE_CHANGE  = 'C'
SALE_ORDER_CALC_TYPE_NEW  = 'N'
SALE_ORDER_CALC_TYPE_REFRESH  = 'R'

Methods

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.
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
getDeliveryLocation()  : float
getDeliveryPrice()  : float
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
getPersonTypeId()  : int
Return person type id of order
getPrice()  : float
Return order price
getPropertyCollection()  : PropertyValueCollectionBase
getRegistryEntity()  : string
getRegistryType()  : string
getSettableFields()  : mixed
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
getUfId()  : null
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
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()  : string
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
loadPropertyCollection()  : PropertyValueCollectionBase
markFieldCustom()  : mixed
onBasketModify()  : Result
Modify basket.
refreshData()  : Result
Full order refresh
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>
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'

Methods

appendBasket()

Append basket to order

public appendBasket(BasketBase $basket) : Result
Parameters
$basket : BasketBase
Tags
throws
NotSupportedException
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

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

getDeliveryLocation()

public getDeliveryLocation() : float
Return values
float

getDeliveryPrice()

public getDeliveryPrice() : float
Return values
float

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
NotImplementedException
Return values
Result

getPersonTypeId()

Return person type id of order

public getPersonTypeId() : int
Return values
int

getPrice()

Return order price

public getPrice() : float
Return values
float

getRegistryEntity()

public static getRegistryEntity() : string
Return values
string

getRegistryType()

public static getRegistryType() : string
Tags
throws
NotImplementedException
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

getUfId()

Return user field id

public static getUfId() : null
Return values
null

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

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

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

markFieldCustom()

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

onBasketModify()

Modify basket.

public onBasketModify(string $action, BasketItemBase $basketItem[, null|string $name = null ][, null|string|int|float $oldValue = null ][, null|string|int|float $value = null ]) : Result
Parameters
$action : string

Action.

$basketItem : BasketItemBase

Basket item.

$name : null|string = null

Field name.

$oldValue : null|string|int|float = null

Old value.

$value : null|string|int|float = null

New value.

Tags
throws
NotImplementedException
throws
NotSupportedException
throws
ObjectNotFoundException
Return values
Result

refreshData()

Full order refresh

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

save()

Save order

public save() : Result
Tags
throws
ArgumentException
throws
ArgumentOutOfRangeException
throws
NotImplementedException
throws
ObjectException
Return values
Result

setBasket()

Append basket to order and refresh it

public setBasket(BasketBase $basket) : Result
Parameters
$basket : BasketBase
Tags
throws
NotSupportedException
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>
Return values
array<string|int, mixed>

unmarkFieldCustom()

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

verify()

Verify object to correctness

public verify() : Result
Return values
Result

        
On this page

Search results