1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
Класс DiscountCompatibility

Открытые статические члены

static initUseMode ($mode=self::MODE_CLIENT, $config=array())
static getUseMode ()
static usedByClient ()
static usedByManager ()
static isSaved ()
static setSaved ($save)
static isRepeatSave ()
static setRepeatSave ($repeat)
static isSuccess ()
static getErrors ()
static clearErrors ()
static getConfig ()
static setShipment ($order, $shipment)
static init ($mode=self::MODE_CLIENT, $config=array())
static reInit ($mode=self::MODE_CLIENT, $config=array())
static isInited ()
static isUsed ()
static stopUsageCompatible ()
static revertUsageCompatible ()
static setBasketItemBasePrice ($code, $price, $currency)
static setBasketBasePrice ($basket)
static getBasketItemBasePrice ($code)
static setBasketItemDiscounts ($code, $discountList)
static getBasketItemDiscounts ($code)
static setBasketItemData ($code, $providerData)
static clearBasketItemData ($code)
static clearDiscountResult ()
static fillBasketData (&$basket)
static calculateBasketDiscounts (&$basket)
static setApplyMode (&$basket)
static setOrderData ($order)
static setOldDiscountResult ($discountList)
static getOldDiscountResult ()
static calculateSaleDiscount (&$order, $discount)
static getApplyResult ($extMode=false)
static setBasketCode ($index, $code)
static getResult ()
static roundPrices (array &$basket, array $orderData=array())

Поля данных

const MODE_CLIENT = 0x0001
const MODE_MANAGER = 0x0002
const MODE_ORDER = 0x0004
const MODE_SYSTEM = 0x0008
const MODE_EXTERNAL = 0x0010
const MODE_DISABLED = 0x0020
const ERROR_ID = 'BX_SALE_DISCOUNT_COMPATIBILITY'

Защищенные статические члены

static isCustomPrice ($basketItem)
static calculateBasketItemDiscount ($code, $fields)
static convertDiscount ($discount)
static convertCoupon ($coupon, $discount)
static formatDescription ($descr)
static getStepResult ($order)
static getStepResultOld ($currentOrder)
static correctStepResult (&$order, &$stepResult, $discount)
static getApplyDiscounts ()
static remakingDiscountResult ()

Статические защищенные данные

static $init = false
static $useMode = self::MODE_CLIENT
static $errors = array()
static $config = array()
static $order = null
static $discountUseMode = null
static $basketBasePrice = array()
static $basketDiscountList = array()
static $basketItemsData = array()
static $discountResult = array()
static $discountsCache = array()
static $couponsCache = array()
static $previousOrderData = array()
static $currentOrderData = array()
static $compatibleSaleDiscountResult = array()
static $useCompatible = false
static $shipmentOrder = null
static $shipmentId = null
static $basketCodes = array()
static $saved = false
static $repeatSave = false

Подробное описание

См. определение в файле discountcompatibility.php строка 11

Методы

◆ calculateBasketDiscounts()

calculateBasketDiscounts ( & $basket)
static

Calculate basket discounts for save.

Аргументы
array&$basketBasket items.
Возвращает
bool

См. определение в файле discountcompatibility.php строка 659

◆ calculateBasketItemDiscount()

calculateBasketItemDiscount ( $code,
$fields )
staticprotected

Calculate basket discounts for item.

Аргументы
string | int$codeBasket code.
array$fieldsBasket data.
Возвращает
bool

См. определение в файле discountcompatibility.php строка 1105

◆ calculateSaleDiscount()

calculateSaleDiscount ( & $order,
$discount )
static

Save sale discount.

Аргументы
array&$orderCurrent order data.
array$discountDiscount data.
Возвращает
bool

См. определение в файле discountcompatibility.php строка 785

◆ clearBasketItemData()

clearBasketItemData ( $code)
static

Clear basket item data.

Аргументы
int$codeBasket code.
Возвращает
void

См. определение в файле discountcompatibility.php строка 534

◆ clearDiscountResult()

clearDiscountResult ( )
static

Clear results before calculate.

Возвращает
void

См. определение в файле discountcompatibility.php строка 551

◆ clearErrors()

clearErrors ( )
static

Clear errors list.

Возвращает
void

См. определение в файле discountcompatibility.php строка 278

◆ convertCoupon()

convertCoupon ( $coupon,
$discount )
staticprotected

Convert coupon for saving in order.

Аргументы
string | array$couponCoupon.
int$discountOrder discount id.
Возвращает
Sale\Result

См. определение в файле discountcompatibility.php строка 1244

◆ convertDiscount()

convertDiscount ( $discount)
staticprotected

Convert discount for saving in order.

Аргументы
array$discountRaw discount data.
Возвращает
Sale\Result

См. определение в файле discountcompatibility.php строка 1192

◆ correctStepResult()

correctStepResult ( & $order,
& $stepResult,
$discount )
staticprotected

Correct data for exotic coupon.

Аргументы
array&$orderCurrent order data.
array&$stepResultCurrenct discount result.
array$discountDiscount data.
Возвращает
void

См. определение в файле discountcompatibility.php строка 1437

◆ fillBasketData()

fillBasketData ( & $basket)
static

Fill base prices.

Аргументы
array&$basketBasket data.
Возвращает
void

См. определение в файле discountcompatibility.php строка 567

◆ formatDescription()

formatDescription ( $descr)
staticprotected

Return formatted discount description.

Аргументы
array | bool$descrDescription.
Возвращает
array

См. определение в файле discountcompatibility.php строка 1285

◆ getApplyDiscounts()

getApplyDiscounts ( )
staticprotected

Returns discount and coupon list.

Возвращает
void

См. определение в файле discountcompatibility.php строка 1491

◆ getApplyResult()

getApplyResult ( $extMode = false)
static

Return discount list description.

Аргументы
bool$extModeExtended mode.
Возвращает
array

См. определение в файле discountcompatibility.php строка 883

◆ getBasketItemBasePrice()

getBasketItemBasePrice ( $code)
static

Get base price for basket item.

Аргументы
string | int$codeBasket code.
Возвращает
float|null

См. определение в файле discountcompatibility.php строка 450

◆ getBasketItemDiscounts()

getBasketItemDiscounts ( $code)
static

Get product discounts for basket item.

Аргументы
string | int$codeBasket code.
Возвращает
null|array

См. определение в файле discountcompatibility.php строка 483

◆ getConfig()

getConfig ( )
static

Returns configuration parameters.

Возвращает
array

См. определение в файле discountcompatibility.php строка 288

◆ getErrors()

getErrors ( )
static

Return error list.

Возвращает
array

См. определение в файле discountcompatibility.php строка 268

◆ getOldDiscountResult()

getOldDiscountResult ( )
static

Return result discount list in old format. Compatibility only.

Возвращает
array

См. определение в файле discountcompatibility.php строка 773

◆ getResult()

getResult ( )
static

Return discount result for old api.

Возвращает
array|bool

См. определение в файле discountcompatibility.php строка 915

◆ getStepResult()

getStepResult ( $order)
staticprotected

Returns result after one discount.

Аргументы
array$orderOrder current data.
Возвращает
array

См. определение в файле discountcompatibility.php строка 1325

◆ getStepResultOld()

getStepResultOld ( $currentOrder)
staticprotected

Returns result after one discount in old format.

Аргументы
array$currentOrderCurrent order data.
Возвращает
array

См. определение в файле discountcompatibility.php строка 1375

◆ getUseMode()

getUseMode ( )
static

Return use mode.

Возвращает
int

См. определение в файле discountcompatibility.php строка 178

◆ init()

init ( $mode = self::MODE_CLIENT,
$config = array() )
static

Initialization discount save information.

Аргументы
int$modeDiscount manager mode.
array$configInitial params (site, currency, order).
Возвращает
void

См. определение в файле discountcompatibility.php строка 314

◆ initUseMode()

initUseMode ( $mode = self::MODE_CLIENT,
$config = array() )
static

Init use mode.

Аргументы
int$modeSave discount information mode.
array$configInitial params (site, currency). keys are case sensitive:
  • string SITE_ID Current site
  • string CURRENCY Site currency
  • string ORDER_ID Order id
.
Возвращает
void

См. определение в файле discountcompatibility.php строка 88

◆ isCustomPrice()

isCustomPrice ( $basketItem)
staticprotected

Returns existing custom price.

Аргументы
array$basketItemBasket item.
Возвращает
bool

См. определение в файле discountcompatibility.php строка 1090

◆ isInited()

isInited ( )
static

Check initialization.

Возвращает
bool

См. определение в файле discountcompatibility.php строка 350

◆ isRepeatSave()

isRepeatSave ( )
static

Return repeat save flag (for old components only). Use ONLY kernel developers.

См. определение в файле discountcompatibility.php строка 234

◆ isSaved()

isSaved ( )
static

Return saved flag (for old components only). Use ONLY kernel developers.

См. определение в файле discountcompatibility.php строка 209

◆ isSuccess()

isSuccess ( )
static

Return result operation.

Возвращает
bool

См. определение в файле discountcompatibility.php строка 258

◆ isUsed()

isUsed ( )
static

Check used compatible calculate.

Возвращает
bool

См. определение в файле discountcompatibility.php строка 360

◆ reInit()

reInit ( $mode = self::MODE_CLIENT,
$config = array() )
static

Reinitialization discount save information.

Аргументы
int$modeDiscount manager mode.
array$configInitial params (site, currency, order).
Возвращает
void

См. определение в файле discountcompatibility.php строка 339

◆ remakingDiscountResult()

remakingDiscountResult ( )
staticprotected

Change result format.

Возвращает
void

См. определение в файле discountcompatibility.php строка 1584

◆ revertUsageCompatible()

revertUsageCompatible ( )
static

Reverts usage compatible mode. It's important for situation with new API and old API.

См. определение в файле discountcompatibility.php строка 386

◆ roundPrices()

roundPrices ( array & $basket,
array $orderData = array() )
static

Round prices.

Аргументы
array&$basketBasket items.
array$orderDataOrder (without basket).
Возвращает
void

См. определение в файле discountcompatibility.php строка 1032

◆ setApplyMode()

setApplyMode ( & $basket)
static

Save apply mode information.

Аргументы
array&$basketBasket items.
Возвращает
void

См. определение в файле discountcompatibility.php строка 701

◆ setBasketBasePrice()

setBasketBasePrice ( $basket)
static

Set base price for all basket items.

Аргументы
array$basketBasket.
Возвращает
void
Исключения
Main

ArgumentNullException

@noinspection PhpMethodOrClassCallIsNotCaseSensitiveInspection

См. определение в файле discountcompatibility.php строка 423

◆ setBasketCode()

setBasketCode ( $index,
$code )
static

Set basket code.

Аргументы
string | int$indexItem index.
string | int$codeBasket code.
Возвращает
void

См. определение в файле discountcompatibility.php строка 905

◆ setBasketItemBasePrice()

setBasketItemBasePrice ( $code,
$price,
$currency )
static

Set base price for basket item.

Аргументы
string | int$codeBasket code.
float$pricePrice.
string$currencyCurrency.
Возвращает
void

@noinspection PhpMethodOrClassCallIsNotCaseSensitiveInspection

См. определение в файле discountcompatibility.php строка 402

◆ setBasketItemData()

setBasketItemData ( $code,
$providerData )
static
Аргументы
int | string$codeBasket code.
array$providerDataProduct data from provider.
Возвращает
void

См. определение в файле discountcompatibility.php строка 497

◆ setBasketItemDiscounts()

setBasketItemDiscounts ( $code,
$discountList )
static

Set product discounts for basket item.

Аргументы
string | int$codeBasket code.
array$discountListDiscount list.
Возвращает
void

См. определение в файле discountcompatibility.php строка 464

◆ setOldDiscountResult()

setOldDiscountResult ( $discountList)
static

Save result discount list from CSaleDiscount\DoProcessOrder.

Аргументы
array$discountListResult from CSaleDiscount\DoProcessOrder.
Возвращает
void

См. определение в файле discountcompatibility.php строка 763

◆ setOrderData()

setOrderData ( $order)
static

Push to stack current order data.

Аргументы
array$orderCurrent order data.
Возвращает
void

См. определение в файле discountcompatibility.php строка 748

◆ setRepeatSave()

setRepeatSave ( $repeat)
static

Set repeat flag (for old components only). Use ONLY kernel developers.

См. определение в файле discountcompatibility.php строка 246

◆ setSaved()

setSaved ( $save)
static

Set save flag (for old components only). Use ONLY kernel developers.

См. определение в файле discountcompatibility.php строка 221

◆ setShipment()

setShipment ( $order,
$shipment )
static

Set shipment.

Аргументы
int$orderOrder id.
int | array$shipmentShipment id.
Возвращает
void

См. определение в файле discountcompatibility.php строка 301

◆ stopUsageCompatible()

stopUsageCompatible ( )
static

Stops usage compatible mode. It's important for situation with new API and old API. Be careful! Don't forget revert this action.

См. определение в файле discountcompatibility.php строка 372

◆ usedByClient()

usedByClient ( )
static

Check client use mode.

Возвращает
bool

См. определение в файле discountcompatibility.php строка 188

◆ usedByManager()

usedByManager ( )
static

Check manager use mode.

Возвращает
bool

См. определение в файле discountcompatibility.php строка 198

Поля

◆ $basketBasePrice

$basketBasePrice = array()
staticprotected

См. определение в файле discountcompatibility.php строка 28

◆ $basketCodes

$basketCodes = array()
staticprotected

См. определение в файле discountcompatibility.php строка 40

◆ $basketDiscountList

$basketDiscountList = array()
staticprotected

См. определение в файле discountcompatibility.php строка 29

◆ $basketItemsData

$basketItemsData = array()
staticprotected

См. определение в файле discountcompatibility.php строка 30

◆ $compatibleSaleDiscountResult

$compatibleSaleDiscountResult = array()
staticprotected

См. определение в файле discountcompatibility.php строка 36

◆ $config

$config = array()
staticprotected

См. определение в файле discountcompatibility.php строка 25

◆ $couponsCache

$couponsCache = array()
staticprotected

См. определение в файле discountcompatibility.php строка 33

◆ $currentOrderData

$currentOrderData = array()
staticprotected

См. определение в файле discountcompatibility.php строка 35

◆ $discountResult

$discountResult = array()
staticprotected

См. определение в файле discountcompatibility.php строка 31

◆ $discountsCache

$discountsCache = array()
staticprotected

См. определение в файле discountcompatibility.php строка 32

◆ $discountUseMode

$discountUseMode = null
staticprotected

См. определение в файле discountcompatibility.php строка 27

◆ $errors

$errors = array()
staticprotected

См. определение в файле discountcompatibility.php строка 24

◆ $init

$init = false
staticprotected

См. определение в файле discountcompatibility.php строка 22

◆ $order

$order = null
staticprotected

См. определение в файле discountcompatibility.php строка 26

◆ $previousOrderData

$previousOrderData = array()
staticprotected

См. определение в файле discountcompatibility.php строка 34

◆ $repeatSave

$repeatSave = false
staticprotected

См. определение в файле discountcompatibility.php строка 42

◆ $saved

$saved = false
staticprotected

См. определение в файле discountcompatibility.php строка 41

◆ $shipmentId

$shipmentId = null
staticprotected

См. определение в файле discountcompatibility.php строка 39

◆ $shipmentOrder

$shipmentOrder = null
staticprotected

См. определение в файле discountcompatibility.php строка 38

◆ $useCompatible

$useCompatible = false
staticprotected

См. определение в файле discountcompatibility.php строка 37

◆ $useMode

$useMode = self::MODE_CLIENT
staticprotected

См. определение в файле discountcompatibility.php строка 23

◆ ERROR_ID

const ERROR_ID = 'BX_SALE_DISCOUNT_COMPATIBILITY'

См. определение в файле discountcompatibility.php строка 20

◆ MODE_CLIENT

const MODE_CLIENT = 0x0001

См. определение в файле discountcompatibility.php строка 13

◆ MODE_DISABLED

const MODE_DISABLED = 0x0020

См. определение в файле discountcompatibility.php строка 18

◆ MODE_EXTERNAL

const MODE_EXTERNAL = 0x0010

См. определение в файле discountcompatibility.php строка 17

◆ MODE_MANAGER

const MODE_MANAGER = 0x0002

См. определение в файле discountcompatibility.php строка 14

◆ MODE_ORDER

const MODE_ORDER = 0x0004

См. определение в файле discountcompatibility.php строка 15

◆ MODE_SYSTEM

const MODE_SYSTEM = 0x0008

См. определение в файле discountcompatibility.php строка 16


Объявления и описания членов класса находятся в файле: