Bitrix API

OrderEdit

Class OrderEdit Helper class for order administration.

Table of Contents

Constants

BASKET_CODE_NEW  = 'new'

Properties

$isBuyerIdChanged  : mixed
$isRefreshData  : mixed
$isTrustProductFormData  : mixed
$needUpdateNewProductPrice  : mixed

Methods

createOrderFromForm()  : Order
editOrderByFormData()  : Order
fillBasketItem()  : Result
fillBasketItems()  : mixed
fillOrderProperties()  : mixed
fillSimpleFields()  : Result
getCompanyList()  : array<string|int, mixed>
getCouponList()  : mixed
getCouponsData()  : mixed
getDiscountsApplyResult()  : array<string|int, mixed>
getFastNavigationHtml()  : string
getLockingMessage()  : mixed
getOrderedDiscounts()  : mixed
getProblemBlockHtml()  : string
getProductDetails()  : mixed
getScripts()  : string
getSiteName()  : mixed
getTotalPrices()  : mixed
getUserId()  : mixed
getUserName()  : string
initCouponsData()  : mixed
isBasketItemNew()  : mixed
makeSelectHtml()  : string
makeSelectHtmlBodyWithRestricted()  : string
makeSelectHtmlWithRestricted()  : string
restoreFieldsNames()  : mixed
saveCoupons()  : mixed
saveProfileData()  : mixed
setBasketItemFields()  : mixed
setProductDetails()  : mixed
setProviderTrustData()  : mixed

Constants

BASKET_CODE_NEW

public mixed BASKET_CODE_NEW = 'new'

Properties

$isBuyerIdChanged

public static mixed $isBuyerIdChanged = false

$isRefreshData

public static mixed $isRefreshData = false

$isTrustProductFormData

public static mixed $isTrustProductFormData = false

$needUpdateNewProductPrice

public static mixed $needUpdateNewProductPrice = false

Methods

createOrderFromForm()

public static createOrderFromForm(array<string|int, mixed> $formData, mixed $creatorUserId, bool $createUserIfNeed, array<string|int, mixed> $files, Result &$opResult) : Order
Parameters
$formData : array<string|int, mixed>
$creatorUserId : mixed
$createUserIfNeed : bool
$files : array<string|int, mixed>
$opResult : Result
Tags
throws
ArgumentNullException
throws
SystemException
Return values
Order

editOrderByFormData()

public static editOrderByFormData(array<string|int, mixed> $formData, Order $order, int $userId, bool $createUserIfNeed, array<string|int, mixed> $files, Result &$result) : Order
Parameters
$formData : array<string|int, mixed>
$order : Order
$userId : int
$createUserIfNeed : bool
$files : array<string|int, mixed>
$result : Result
Tags
throws
SystemException
throws
ObjectNotFoundException
Return values
Order

fillBasketItem()

public static fillBasketItem(BasketItem $item, array<string|int, mixed> $productData, Order $order, Basket $basket[, bool $needDataUpdate = false ]) : Result

use \Bitrix\Sale\Helpers\Admin\OrderEdit::fillBasketItems()

Parameters
$item : BasketItem
$productData : array<string|int, mixed>
$order : Order
$basket : Basket
$needDataUpdate : bool = false
Tags
throws
ArgumentNullException
throws
SystemException
throws
ArgumentOutOfRangeException
throws
NotSupportedException
throws
ObjectNotFoundException
Return values
Result

fillBasketItems()

public static fillBasketItems(Basket $basket, array<string|int, mixed> $productsFormData, Order $order[, array<string|int, mixed> $needDataUpdate = array() ]) : mixed
Parameters
$basket : Basket
$productsFormData : array<string|int, mixed>
$order : Order
$needDataUpdate : array<string|int, mixed> = array()

fillOrderProperties()

public static fillOrderProperties(OrderBase $order, mixed $formData[, mixed $files = [] ]) : mixed
Parameters
$order : OrderBase
$formData : mixed
$files : mixed = []

fillSimpleFields()

public static fillSimpleFields(Order $order, array<string|int, mixed> $formData[, int $userId = 0 ]) : Result
Parameters
$order : Order
$formData : array<string|int, mixed>
$userId : int = 0
Return values
Result

getCompanyList()

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

getCouponList()

public static getCouponList([Order $order = null ][, mixed $needRecalculate = true ]) : mixed
Parameters
$order : Order = null
$needRecalculate : mixed = true

getCouponsData()

public static getCouponsData() : mixed

getDiscountsApplyResult()

public static getDiscountsApplyResult(Order $order[, bool $needRecalculate = false ]) : array<string|int, mixed>
Parameters
$order : Order
$needRecalculate : bool = false
Tags
throws
ArgumentNullException
throws
ArgumentOutOfRangeException
throws
NotSupportedException
Return values
array<string|int, mixed>

getFastNavigationHtml()

public static getFastNavigationHtml(array<string|int, mixed> $items[, string $formId = '' ][, string $tabId = '' ]) : string
Parameters
$items : array<string|int, mixed>

.

$formId : string = ''
$tabId : string = ''
Return values
string

HTML Navigation block.

getLockingMessage()

public static getLockingMessage(mixed $orderId) : mixed
Parameters
$orderId : mixed

getOrderedDiscounts()

public static getOrderedDiscounts(Order $order[, mixed $needRecalculate = true ]) : mixed
Parameters
$order : Order
$needRecalculate : mixed = true

getProblemBlockHtml()

public static getProblemBlockHtml(string $text, int $orderId) : string
Parameters
$text : string

The order problem description.

$orderId : int
Return values
string

HTML Problem block.

getProductDetails()

public static getProductDetails(mixed $productId, mixed $userId, mixed $siteId) : mixed
Parameters
$productId : mixed
$userId : mixed
$siteId : mixed

getScripts()

public static getScripts(Order $order, mixed $formId) : string
Parameters
$order : Order
$formId : mixed
Return values
string

getSiteName()

public static getSiteName(mixed &$siteId) : mixed
Parameters
$siteId : mixed

getTotalPrices()

public static getTotalPrices(Order $order, OrderBasket $orderBasket[, mixed $needRecalculate = true ]) : mixed
Parameters
$order : Order
$orderBasket : OrderBasket
$needRecalculate : mixed = true

getUserId()

public static getUserId(mixed $order, mixed $formData, mixed $createUserIfNeed, Result $result) : mixed
Parameters
$order : mixed
$formData : mixed
$createUserIfNeed : mixed
$result : Result

getUserName()

public static getUserName(int $userId[, string $siteId = "" ]) : string
Parameters
$userId : int

.

$siteId : string = ""

.

Return values
string

User name.

initCouponsData()

public static initCouponsData(mixed $newUserId[, int $orderId = 0 ][, int|null $oldUserId = 0 ]) : mixed
Parameters
$newUserId : mixed
$orderId : int = 0
$oldUserId : int|null = 0

isBasketItemNew()

public static isBasketItemNew(mixed $basketCode) : mixed
Parameters
$basketCode : mixed

makeSelectHtml()

public static makeSelectHtml(string $name, array<string|int, mixed> $data[, string $selected = "" ][, bool $showNotUse = true ][, array<string|int, mixed> $attributes = array() ]) : string
Parameters
$name : string
$data : array<string|int, mixed>
$selected : string = ""
$showNotUse : bool = true
$attributes : array<string|int, mixed> = array()
Tags
throws
ArgumentTypeException
Return values
string

""

makeSelectHtmlBodyWithRestricted()

public static makeSelectHtmlBodyWithRestricted(mixed $data[, string $selected = '' ][, bool|true $showNotUse = true ]) : string
Parameters
$data : mixed
$selected : string = ''
$showNotUse : bool|true = true
Return values
string

makeSelectHtmlWithRestricted()

public static makeSelectHtmlWithRestricted(mixed $name, array<string|int, mixed> $data[, string $selected = "" ][, bool|true $showNotUse = true ][, array<string|int, mixed> $attributes = array() ]) : string
Parameters
$name : mixed
$data : array<string|int, mixed>
$selected : string = ""
$showNotUse : bool|true = true
$attributes : array<string|int, mixed> = array()
Tags
throws
ArgumentTypeException
Return values
string

restoreFieldsNames()

public static restoreFieldsNames(array<string|int, mixed> $data[, mixed $path = "" ]) : mixed
Parameters
$data : array<string|int, mixed>
$path : mixed = ""

saveCoupons()

public static saveCoupons(mixed $userId, mixed $formData) : mixed
Parameters
$userId : mixed
$formData : mixed

saveProfileData()

public static saveProfileData(mixed $profileId, Order $order, array<string|int, mixed> $formData) : mixed
Parameters
$profileId : mixed
$order : Order
$formData : array<string|int, mixed>

setBasketItemFields()

public static setBasketItemFields(BasketItem $item[, array<string|int, mixed> $fields = array() ]) : mixed
Parameters
$item : BasketItem
$fields : array<string|int, mixed> = array()

setProductDetails()

public static setProductDetails(mixed $productId, mixed $userId, mixed $siteId, array<string|int, mixed> $params) : mixed
Parameters
$productId : mixed
$userId : mixed
$siteId : mixed
$params : array<string|int, mixed>
Tags
throws
ArgumentNullException

setProviderTrustData()

public static setProviderTrustData(BasketItem $item, Order $order, array<string|int, mixed> $data) : mixed
Parameters
$item : BasketItem
$order : Order
$data : array<string|int, mixed>

        
On this page

Search results