См. определение в файле discountbase.php строка 19
◆ __construct()
◆ __destruct()
◆ applyLoadedOrderConfig()
| applyLoadedOrderConfig |
( |
array | $data | ) |
|
|
protected |
Set loaded order settings.
- Аргументы
-
| array | $data | Order settings from database. |
- Возвращает
- void
См. определение в файле discountbase.php строка 1076
◆ applySaleDiscount()
◆ buildFromBasket()
| buildFromBasket |
( |
BasketBase | $basket, |
|
|
Context\BaseContext | $context ) |
|
static |
Builds discounts from basket. Basket doesn't have to have a order. Context describes user and user groups which use in
- Аргументы
-
| BasketBase | $basket | Basket. |
| Context\BaseContext | $context | Context. |
- Возвращает
- DiscountBase|null
- Исключения
-
InvalidOperationException
См. определение в файле discountbase.php строка 288
◆ calculateApply()
Calculate discount by exist order.
- Возвращает
- Result
См. определение в файле discountbase.php строка 1343
◆ calculateApplyBasketDiscount()
| calculateApplyBasketDiscount |
( |
| ) |
|
|
protected |
Apply basket discount in exist order.
- Возвращает
- Result
См. определение в файле discountbase.php строка 2480
◆ calculateApplyDiscountBlock()
| calculateApplyDiscountBlock |
( |
| ) |
|
|
protected |
Calculate discount block for existing order.
- Возвращает
- Result
См. определение в файле discountbase.php строка 2585
◆ calculateApplySaleAdditionalCoupons()
| calculateApplySaleAdditionalCoupons |
( |
array | $applyCoupons | ) |
|
|
protected |
Calculate additional sale coupons.
- Аргументы
-
| array | $applyCoupons | Coupons data. |
- Возвращает
- Result
См. определение в файле discountbase.php строка 5080
◆ calculateDiscountPercent()
| calculateDiscountPercent |
( |
| $basePrice, |
|
|
| $discount ) |
|
static |
Calculate discount percent for public components.
- Аргументы
-
| int | float | $basePrice | Base price. |
| int | float | $discount | Discount value (for an extra can be negative). |
- Возвращает
- float|int|null
См. определение в файле discountbase.php строка 5762
◆ calculateMixed()
Calculate discount by exist order with new items.
- Возвращает
- Result
См. определение в файле discountbase.php строка 1417
◆ checkBasketDiscounts()
◆ checkDiscountConditions()
| checkDiscountConditions |
( |
| ) |
|
|
protected |
◆ clearAdditionalCoupons()
| clearAdditionalCoupons |
( |
array | $coupons | ) |
|
|
protected |
◆ clearCurrentApplyBlock()
| clearCurrentApplyBlock |
( |
| ) |
|
|
protected |
Internal. Fill current apply block empty data.
- Возвращает
- void
См. определение в файле discountbase.php строка 4435
◆ correctStepResult()
| correctStepResult |
( |
& | $stepResult, |
|
|
| $discount ) |
|
protected |
Correct data for exotic coupon.
- Аргументы
-
| array | &$stepResult | Currenct discount result. |
| array | $discount | Discount data. |
- Возвращает
- void
См. определение в файле discountbase.php строка 3685
◆ createClone()
| createClone |
( |
\SplObjectStorage | $cloneEntity | ) |
|
◆ executeDiscountList()
◆ fillBasketLastDiscount()
| fillBasketLastDiscount |
( |
| ) |
|
|
protected |
Fill last discount flag for basket items. Only for basket or new order or refreshed order.
- Возвращает
- void
См. определение в файле discountbase.php строка 4759
◆ fillCurrentStep()
Internal. Fill current step data.
- Аргументы
-
| array | $data | Only not empty keys. |
- Возвращает
- void
См. определение в файле discountbase.php строка 4462
◆ fillDiscountResult()
◆ fillEmptyCurrentStep()
Internal. Clear current step data.
- Возвращает
- void
См. определение в файле discountbase.php строка 4444
◆ fillEmptyDiscountResult()
| fillEmptyDiscountResult |
( |
| ) |
|
|
protected |
◆ formatDescription()
| formatDescription |
( |
| $descr | ) |
|
|
staticprotected |
Return formatted discount description.
- Аргументы
-
- Возвращает
- array
См. определение в файле discountbase.php строка 4538
◆ getAllowedBasketCodeList()
| getAllowedBasketCodeList |
( |
| ) |
|
|
protected |
◆ getApplyDiscounts()
Returns discount and coupon list.
- Возвращает
- void
См. определение в файле discountbase.php строка 3774
◆ getApplyMode()
Returns current sale discount apply mode.
- Возвращает
- int
- Исключения
-
ArgumentNullException
См. определение в файле discountbase.php строка 418
◆ getApplyModeList()
| getApplyModeList |
( |
| $extendedMode = false | ) |
|
|
static |
Return apply mode list.
- Аргументы
-
| bool | $extendedMode | Get mode list with names. |
- Возвращает
- array
См. определение в файле discountbase.php строка 390
◆ getApplyPrices()
◆ getApplyResult()
| getApplyResult |
( |
| $extMode = false | ) |
|
Return discount list description.
- Аргументы
-
| bool | $extMode | Extended mode. |
- Возвращает
- array
Переопределяется в Discount.
См. определение в файле discountbase.php строка 551
◆ getBasket()
Return current basket.
- Возвращает
- BasketBase
См. определение в файле discountbase.php строка 774
◆ getBasketCodes()
| getBasketCodes |
( |
| $full = true | ) |
|
|
protected |
Returns basket codes for calculate.
- Аргументы
-
| bool | $full | Full or apply mode. |
- Возвращает
- array
См. определение в файле discountbase.php строка 4272
◆ getBasketItemFields()
Returns array with basket item field values.
- Аргументы
-
| BasketItemBase | $basketItem | Basket collection item. |
- Возвращает
- array
См. определение в файле discountbase.php строка 978
◆ getBasketItemValue()
| getBasketItemValue |
( |
| $code, |
|
|
| $field ) |
|
protected |
◆ getBasketItemValueList()
| getBasketItemValueList |
( |
| $code, |
|
|
array | $fields ) |
|
protected |
◆ getConditionField()
◆ getDiscountCouponClassName()
| getDiscountCouponClassName |
( |
| ) |
|
|
protected |
Returns current discount coupons manager class name.
- Возвращает
- string
- Исключения
-
ArgumentException
- Исключения
-
NotImplementedException
См. определение в файле discountbase.php строка 5618
◆ getDiscountStoredActionData()
| getDiscountStoredActionData |
( |
| $orderDiscountId | ) |
|
|
protected |
Returns stored action data for discount.
- Аргументы
-
| int | $orderDiscountId | Converted discount id. |
- Возвращает
- array|null
См. определение в файле discountbase.php строка 3745
◆ getEmptyApplyBlock()
◆ getEntityMarkerClassName()
| getEntityMarkerClassName |
( |
| ) |
|
|
protected |
- Возвращает
- string
- Исключения
-
ArgumentException
- Исключения
-
NotImplementedException
См. определение в файле discountbase.php строка 5644
◆ getEntitySaveIdentifier()
| getEntitySaveIdentifier |
( |
array | $entity | ) |
|
|
protected |
Returns data for save to database.
- Аргументы
-
- Возвращает
- array|null
Переопределяется в Discount.
См. определение в файле discountbase.php строка 4026
◆ getExecuteFieldList()
◆ getExecuteFieldName()
| getExecuteFieldName |
( |
| $fieldName | ) |
|
|
staticfinalprotected |
Return field name for save eval result. Only for core.
См. определение в файле discountbase.php строка 5391
◆ getInstance()
Returns discount instance.
- Аргументы
-
| string | $index | Entity instance identifier. |
- Возвращает
- DiscountBase
См. определение в файле discountbase.php строка 5224
◆ getInstanceIndexByBasket()
| getInstanceIndexByBasket |
( |
BasketBase | $basket, |
|
|
Context\BaseContext | $context = null ) |
|
staticprotected |
◆ getInstanceIndexByOrder()
◆ getModuleSettings()
Returns the current module settings required for calculating discounts.
- Возвращает
- array
- Исключения
-
ArgumentNullException
- Исключения
-
ArgumentOutOfRangeException
См. определение в файле discountbase.php строка 1036
◆ getOrder()
◆ getOrderConfig()
Returns order configuration for save to database.
- Возвращает
- array
Переопределяется в Discount.
См. определение в файле discountbase.php строка 1670
◆ getOrderDiscountClassName()
| getOrderDiscountClassName |
( |
| ) |
|
|
protected |
Returns current order discount class name.
- Возвращает
- string
- Исключения
-
ArgumentException
- Исключения
-
NotImplementedException
См. определение в файле discountbase.php строка 5604
◆ getOrderPropertyCodes()
| getOrderPropertyCodes |
( |
| ) |
|
|
staticprotected |
Return order property codes for translate to order fields.
- Возвращает
- array
См. определение в файле discountbase.php строка 5701
◆ getRegistryType()
Return parent entity type. The method must be overridden in the derived class.
Переопределяется в Discount.
См. определение в файле discountbase.php строка 5263
◆ getRoundIndex()
| getRoundIndex |
( |
| $entity, |
|
|
| $applyCounter = null ) |
|
protected |
◆ getRoundMode()
◆ getShipmentClassName()
Return current shipment class name.
- Возвращает
- string
- Исключения
-
ArgumentException
- Исключения
-
NotImplementedException
См. определение в файле discountbase.php строка 5632
◆ getSiteCurrency()
◆ getSiteId()
◆ getStatusApplyBasketDiscount()
| getStatusApplyBasketDiscount |
( |
| $basketCode, |
|
|
| $orderDiscountId, |
|
|
| $orderCouponId ) |
|
protected |
◆ getStepResult()
| getStepResult |
( |
array | $order | ) |
|
|
staticprotected |
Returns result after one discount.
- Аргументы
-
| array | $order | Order current data. |
- Возвращает
- array
Переопределяется в Discount.
См. определение в файле discountbase.php строка 3649
◆ getUseMode()
◆ initInstanceFromOrder()
| initInstanceFromOrder |
( |
| ) |
|
|
protected |
◆ initUseMode()
Initialization of the discount calculation mode.
- Возвращает
- void
См. определение в файле discountbase.php строка 820
◆ instanceExists()
Returns true, if instance exist.
- Аргументы
-
| string | $index | Entity instance identifier. |
- Возвращает
- bool
См. определение в файле discountbase.php строка 5210
◆ isBasketApplyResultExist()
| isBasketApplyResultExist |
( |
| ) |
|
|
protected |
Return true, if exist apply result from form for basket.
- Возвращает
- bool
См. определение в файле discountbase.php строка 3760
◆ isBasketExist()
◆ isBasketItemChanged()
| isBasketItemChanged |
( |
| $code | ) |
|
|
protected |
Return true if ordered basket item changed (change PRODUCT_ID).
- Аргументы
-
- Возвращает
- bool
@noinspection PhpInternalEntityUsedInspection
См. определение в файле discountbase.php строка 4169
◆ isBasketLastDiscount()
Check last discount flag for basket items. Only for basket or new order or refreshed order.
- Возвращает
- bool
См. определение в файле discountbase.php строка 4800
◆ isBasketNotEmpty()
Returns the existence of a non-empty basket.
- Возвращает
- bool
См. определение в файле discountbase.php строка 800
◆ isClone()
Returns true if discount entity is cloned.
- Возвращает
- bool
См. определение в файле discountbase.php строка 193
◆ isCustomPrice()
| isCustomPrice |
( |
array | $item | ) |
|
|
staticprotected |
Returns exist custom price for basket item.
- Аргументы
-
- Возвращает
- bool
См. определение в файле discountbase.php строка 4077
◆ isCustomPriceByCode()
| isCustomPriceByCode |
( |
| $code | ) |
|
|
protected |
Returns exist custom price for basket item code.
- Аргументы
-
- Возвращает
- bool
См. определение в файле discountbase.php строка 4064
◆ isExistBasketItem()
| isExistBasketItem |
( |
| $code | ) |
|
|
protected |
Return true, if basket item exists.
- Аргументы
-
| string | int | $code | Basket item code. |
- Возвращает
- bool
См. определение в файле discountbase.php строка 4191
◆ isFreezedBasketItem()
| isFreezedBasketItem |
( |
array | $item | ) |
|
|
staticprotected |
Returns true, if allowed apply discounts to basket item.
- Аргументы
-
- Возвращает
- bool
См. определение в файле discountbase.php строка 4158
◆ isFreezedBasketItemByCode()
| isFreezedBasketItemByCode |
( |
| $code | ) |
|
|
protected |
Returns true, if allowed apply discounts to basket item.
- Аргументы
-
| int | string | $code | Basket code. |
- Возвращает
- bool
См. определение в файле discountbase.php строка 4145
◆ isInSet()
Returns check item in set for basket item.
- Аргументы
-
- Возвращает
- bool
См. определение в файле discountbase.php строка 4103
◆ isInSetByCode()
Returns check item in set for basket item code.
- Аргументы
-
- Возвращает
- bool
См. определение в файле discountbase.php строка 4090
◆ isLoaded()
Returns true if the data for calculations is loaded.
- Возвращает
- bool
См. определение в файле discountbase.php строка 250
◆ isMixedBasket()
Returns exist new item in basket.
- Возвращает
- bool
См. определение в файле discountbase.php строка 4213
◆ isNewBasketItem()
| isNewBasketItem |
( |
array | $item | ) |
|
|
staticprotected |
Returns check new basket item for basket item.
- Аргументы
-
- Возвращает
- bool
См. определение в файле discountbase.php строка 4131
◆ isNewBasketItemByCode()
| isNewBasketItemByCode |
( |
| $code | ) |
|
|
protected |
Returns check new basket item for basket item code.
- Аргументы
-
| int | string | $code | Basket code. |
- Возвращает
- bool
См. определение в файле discountbase.php строка 4116
◆ isOrderChanged()
Returns true, if changed children order entities.
- Возвращает
- bool
См. определение в файле discountbase.php строка 4203
◆ isOrderExists()
◆ isOrderNew()
Returns new order flag value.
- Возвращает
- bool
См. определение в файле discountbase.php строка 226
◆ isOrderRefresh()
Returns full refresh status value.
- Возвращает
- bool
См. определение в файле discountbase.php строка 216
◆ isRoundMode()
Return true, if selected check round apply mode.
См. определение в файле discountbase.php строка 3203
◆ isValidState()
◆ loadDefaultOrderConfig()
| loadDefaultOrderConfig |
( |
| ) |
|
|
protected |
◆ loadDiscountByUserGroups()
| loadDiscountByUserGroups |
( |
array | $filter = array() | ) |
|
|
protected |
Load from database discount id for user groups.
См. определение в файле discountbase.php строка 5429
◆ loadDiscountList()
◆ loadDiscountModules()
| loadDiscountModules |
( |
array | $modules | ) |
|
|
protected |
◆ loadOrderData()
◆ mergeDiscountActionResult()
| mergeDiscountActionResult |
( |
| $index, |
|
|
| $stepResult ) |
|
protected |
Merge discount actions result with old data.
- Аргументы
-
| int | $index | Discount index. |
| array | $stepResult | New result. |
- Возвращает
- void
См. определение в файле discountbase.php строка 4360
◆ migrateInstance()
| migrateInstance |
( |
| $oldIndex, |
|
|
| $newIndex ) |
|
staticprotected |
◆ modifyOrderData()
| modifyOrderData |
( |
& | $newData | ) |
|
|
protected |
Modify order data from handlers.
- Аргументы
-
| array | &$newData | New order data from handler. |
- Возвращает
- void
См. определение в файле discountbase.php строка 4526
◆ normalizeDiscountResult()
| normalizeDiscountResult |
( |
| ) |
|
|
protected |
◆ normalizeNewResultRows()
| normalizeNewResultRows |
( |
array & | $rows | ) |
|
|
protected |
Fill common system fields for new discount results.
- Аргументы
-
| array | $rows | Prepared new discount results. |
- Возвращает
- void
См. определение в файле discountbase.php строка 2140
◆ recursiveMerge()
| recursiveMerge |
( |
& | $dest, |
|
|
| $src ) |
|
staticprotected |
Added keys from source array to destination array.
- Аргументы
-
| array | &$dest | Destination array. |
| array | $src | Source array. |
- Возвращает
- void
См. определение в файле discountbase.php строка 5719
◆ remakingDiscountResult()
| remakingDiscountResult |
( |
| ) |
|
|
protected |
◆ removeInstance()
◆ resetBasketPrices()
Fill basket prices from base prices.
- Возвращает
- void
См. определение в файле discountbase.php строка 4624
◆ resetDiscountAppliedFlag()
| resetDiscountAppliedFlag |
( |
| ) |
|
|
protected |
Reset flag of applying discounts for basket items.
- Возвращает
- void
См. определение в файле discountbase.php строка 4640
◆ resetOrderPrice()
◆ resetOrderState()
Set order parameters to their original state before the start of calculations.
- Возвращает
- void
См. определение в файле discountbase.php строка 4581
◆ resetPrices()
◆ revertApplyBlockForBasketItem()
| revertApplyBlockForBasketItem |
( |
| $basketItemId | ) |
|
|
protected |
Reverts apply flag in blocks for basket items which has for example cumulative discount which cancels previous discounts on item.
- Аргументы
-
- Возвращает
- void
См. определение в файле discountbase.php строка 3018
◆ roundApplyBasketPricesByIndex()
| roundApplyBasketPricesByIndex |
( |
array | $index | ) |
|
|
protected |
Round prices in sale discount mode for exist order.
См. определение в файле discountbase.php строка 3524
◆ roundFullBasketPriceByIndex()
| roundFullBasketPriceByIndex |
( |
array | $index | ) |
|
|
protected |
Round prices in sale discount mode for new order.
См. определение в файле discountbase.php строка 3505
◆ saveMixed()
Save discount result for mixed order.
- Возвращает
- Result
См. определение в файле discountbase.php строка 1938
◆ setApplyResult()
| setApplyResult |
( |
| $applyResult | ) |
|
Change applied discount list.
- Аргументы
-
| array | $applyResult | Change apply result. |
- Возвращает
- void
Переопределяется в Discount.
См. определение в файле discountbase.php строка 520
◆ setDiscountStoredActionData()
| setDiscountStoredActionData |
( |
| $orderDiscountId, |
|
|
array | $data ) |
|
protected |
Fill additional discount data.
- Аргументы
-
| int | $orderDiscountId | Converted discount id. |
| array | $data | Discount data. |
- Возвращает
- void
См. определение в файле discountbase.php строка 3727
◆ setExecuteModuleFilter()
| setExecuteModuleFilter |
( |
array | $moduleList | ) |
|
Sets list of execute module which will be used to filter discount.
См. определение в файле discountbase.php строка 379
◆ setNewOrder()
◆ setOrderRefresh()
| setOrderRefresh |
( |
| $state | ) |
|
Set full refresh status from edit order form.
- Аргументы
-
| bool | $state | Refresh or not order. |
- Возвращает
- void
См. определение в файле discountbase.php строка 204
◆ setRoundIndex()
| setRoundIndex |
( |
| $entity, |
|
|
array | $index ) |
|
protected |
Set discount index for use round. Only for sale discount mode.
См. определение в файле discountbase.php строка 3261
◆ setUseMode()
Set calculate mode.
- Аргументы
-
| int | $useMode | Calculate mode. |
- Возвращает
- void
См. определение в файле discountbase.php строка 354
◆ setValidState()
◆ stopCalculate()
Return is allow discount calculate.
- Возвращает
- bool
См. определение в файле discountbase.php строка 747
◆ tryToRevertApplyStatusInBlocks()
| tryToRevertApplyStatusInBlocks |
( |
array | $stepResult | ) |
|
|
protected |
Tries to revert apply status of discounts. It depends on current $stepResult. If it has REVERT_APPLY like true, that we have to cancel discounts on basket items which were affected.
- Аргументы
-
- Возвращает
- void
См. определение в файле discountbase.php строка 2979
◆ useOnlySaleDiscounts()
Return true, if only sale discounts is allowed. For new order or refreshed order use sale option, otherwise use order option.
- Возвращает
- bool
См. определение в файле discountbase.php строка 761
◆ validateLoadedOrderConfig()
| validateLoadedOrderConfig |
( |
| $config | ) |
|
|
protected |
Validate loaded order config.
- Аргументы
-
| mixed | $config | Order configuration. |
- Возвращает
- bool
См. определение в файле discountbase.php строка 1061
◆ $applyResult
◆ $basket
◆ $basketDiscountList
| $basketDiscountList = array() |
|
protected |
◆ $basketItemsData
| $basketItemsData = array() |
|
protected |
◆ $context
◆ $couponsCache
◆ $currentStep
◆ $discountIds
◆ $discountResult
| $discountResult = array() |
|
protected |
◆ $discountResultCounter
| $discountResultCounter = 0 |
|
protected |
◆ $discountsCache
| $discountsCache = array() |
|
protected |
◆ $discountStoredActionData
| $discountStoredActionData = array() |
|
protected |
◆ $entityList
◆ $entityResultCache
| $entityResultCache = array() |
|
protected |
◆ $executeModuleFilter
| $executeModuleFilter = array('all', 'sale', 'catalog') |
|
protected |
◆ $forwardBasketTable
| $forwardBasketTable = array() |
|
protected |
◆ $fullDiscountList
| $fullDiscountList = array() |
|
protected |
◆ $isClone
◆ $loadedModules
◆ $newOrder
◆ $order
◆ $orderData
◆ $orderRefresh
◆ $reverseBasketTable
| $reverseBasketTable = array() |
|
protected |
◆ $roundApplyConfig
| $roundApplyConfig = array() |
|
protected |
◆ $roundApplyMode
| $roundApplyMode = self::ROUND_MODE_FINAL_PRICE |
|
protected |
◆ $saleDiscountCache
| $saleDiscountCache = array() |
|
protected |
◆ $saleDiscountCacheKey
| $saleDiscountCacheKey = '' |
|
protected |
◆ $saleOptions
◆ $useMode
◆ $valid
◆ APPLY_MODE_ADD
| const APPLY_MODE_ADD = 0x0001 |
◆ APPLY_MODE_DISABLE
| const APPLY_MODE_DISABLE = 0x0002 |
◆ APPLY_MODE_FULL_DISABLE
| const APPLY_MODE_FULL_DISABLE = 0x0008 |
◆ APPLY_MODE_FULL_LAST
| const APPLY_MODE_FULL_LAST = 0x0010 |
◆ APPLY_MODE_LAST
| const APPLY_MODE_LAST = 0x0004 |
◆ ENTITY_BASKET_ITEM
| const ENTITY_BASKET_ITEM = 'BASKET_ITEM' |
◆ ENTITY_DELIVERY
| const ENTITY_DELIVERY = 'DELIVERY' |
◆ ENTITY_ORDER
| const ENTITY_ORDER = 'ORDER' |
◆ ERROR_ID
| const ERROR_ID = 'BX_SALE_DISCOUNT' |
◆ EVENT_EXTEND_ORDER_DATA
| const EVENT_EXTEND_ORDER_DATA = 'onExtendOrderData' |
◆ EXECUTE_FIELD_PREFIX
| const EXECUTE_FIELD_PREFIX = 'EXECUTE_' |
◆ ROUND_MODE_BASKET_DISCOUNT
| const ROUND_MODE_BASKET_DISCOUNT = 0x0001 |
◆ ROUND_MODE_FINAL_PRICE
| const ROUND_MODE_FINAL_PRICE = 0x0004 |
◆ ROUND_MODE_SALE_DISCOUNT
| const ROUND_MODE_SALE_DISCOUNT = 0x0002 |
◆ USE_MODE_APPLY
| const USE_MODE_APPLY = 0x0002 |
◆ USE_MODE_COUPONS
| const USE_MODE_COUPONS = 0x0008 |
◆ USE_MODE_FULL
| const USE_MODE_FULL = 0x00001 |
◆ USE_MODE_MIXED
| const USE_MODE_MIXED = 0x0004 |
Объявления и описания членов класса находятся в файле: