|
static | getRegistryType () |
|
static | initUseMode ($mode=self::MODE_CLIENT, $params=array()) |
|
static | getUseMode () |
|
static | usedByClient () |
|
static | usedByManager () |
|
static | usedByExternal () |
|
static | getUserId () |
|
static | getOrderId () |
|
static | isSuccess () |
|
static | getErrors () |
|
static | clearErrors () |
|
static | getStatusList ($extendedMode=false) |
|
static | getCheckCodeList ($extendedMode=false) |
|
static | getCheckCodeMessage ($code) |
|
static | useSavedCouponsForApply ($state) |
|
static | isUsedOrderCouponsForApply () |
|
static | unFreezeCouponStorage () |
|
static | freezeCouponStorage () |
|
static | isFrozenCouponStorage () |
|
static | init ($mode=self::MODE_CLIENT, $params=array(), $clearStorage=false) |
|
static | reInit ($mode=self::MODE_CLIENT, $params=array(), $clearStorage=false) |
|
static | isEntered () |
|
static | add ($coupon) |
|
static | delete ($coupon) |
|
static | clear ($clearStorage=false) |
|
static | migrateStorage ($oldUser) |
|
static | get ($extMode=true, $filter=array(), $show=false, $final=false) |
|
static | getForApply ($filter, $product=array(), $uniqueDiscount=false) |
|
static | getOrderedCoupons ($extMode=true, $filter=array()) |
|
static | verifyApplied () |
|
static | saveApplied () |
|
static | setApplyByProduct ($product, $couponsList, $oldMode=false) |
|
static | setApply ($coupon, $data) |
|
static | deleteApplyByProduct ($product) |
|
static | finalApply () |
|
static | clearApplyCoupon ($coupon) |
|
static | clearApply ($all=true) |
|
static | getData ($coupon, $checkCoupon=true) |
|
static | isExist ($coupon) |
|
static | getEnteredCoupon ($coupon, $clearData=false) |
|
static | logout () |
|
static | filterOrderCoupons ($coupon) |
|
static | setUseOnlySaleDiscounts ($mode) |
|
|
static | getSession () |
|
static | checkBaseData (&$data, $checkCode=self::COUPON_CHECK_OK) |
|
static | checkFullData (&$data, $mode=self::COUPON_MODE_FULL, $checkCode=self::COUPON_CHECK_OK, $currentTimestamp) |
|
static | fillUserInfo (&$result, $existCoupon, $checkCode) |
|
static | initUserId () |
|
static | saveToStorage () |
|
static | eraseAppliedCoupons ($result) |
|
static | createApplyFields (&$couponData) |
|
static | initUseDiscount () |
|
static | filterUnknownCoupons ($coupon) |
|
static | filterFreezeCoupons ($coupon) |
|
static | filterFreezeOrderedCoupons ($coupon) |
|
static | filterOneRowCoupons ($coupon, $hash) |
|
static | filterUniqueDiscount (&$coupons) |
|
static | filterCoupons ($filter, $getId=false) |
|
static | filterArrayCoupons (&$coupons, $filter) |
|
static | getProductHash ($product) |
|
static | getCatalogProductHash ($product) |
|
static | fillCouponHints (&$coupons) |
|
static | setCoupons ($couponsList, $checkCoupons=true) |
|
static | clearSavedCoupons ($coupon) |
|
static | clearSystemData (&$coupons) |
|
static | convertOldFilterFields (array &$filter) |
|
static | getEmptyCouponFields ($coupon) |
|
См. определение в файле discountcouponsmanagerbase.php строка 14
◆ add()
◆ checkBaseData()
static checkBaseData |
( |
& |
$data, |
|
|
|
$checkCode = self::COUPON_CHECK_OK |
|
) |
| |
|
staticprotected |
Checks the basic coupon fields.
- Аргументы
-
array | &$data | Coupon data. |
int | $checkCode | Start status. |
- Возвращает
- int
См. определение в файле discountcouponsmanagerbase.php строка 1569
◆ checkFullData()
static checkFullData |
( |
& |
$data, |
|
|
|
$mode = self::COUPON_MODE_FULL , |
|
|
|
$checkCode = self::COUPON_CHECK_OK , |
|
|
|
$currentTimestamp |
|
) |
| |
|
staticprotected |
Checks the extended coupon fields.
- Аргументы
-
array | &$data | Coupon data. |
int | $mode | Coupon mode (full or simple). |
int | $checkCode | Start check status. |
int | $currentTimestamp | Current time. |
- Возвращает
- int
См. определение в файле discountcouponsmanagerbase.php строка 1665
◆ clear()
static clear |
( |
|
$clearStorage = false | ) |
|
|
static |
◆ clearApply()
static clearApply |
( |
|
$all = true | ) |
|
|
static |
◆ clearApplyCoupon()
static clearApplyCoupon |
( |
|
$coupon | ) |
|
|
static |
◆ clearErrors()
◆ clearSavedCoupons()
static clearSavedCoupons |
( |
|
$coupon | ) |
|
|
staticprotected |
◆ clearSystemData()
static clearSystemData |
( |
& |
$coupons | ) |
|
|
staticprotected |
◆ convertOldFilterFields()
static convertOldFilterFields |
( |
array & |
$filter | ) |
|
|
staticprotected |
◆ createApplyFields()
static createApplyFields |
( |
& |
$couponData | ) |
|
|
staticprotected |
◆ delete()
◆ deleteApplyByProduct()
static deleteApplyByProduct |
( |
|
$product | ) |
|
|
static |
◆ eraseAppliedCoupons()
static eraseAppliedCoupons |
( |
|
$result | ) |
|
|
staticprotected |
◆ fillCouponHints()
static fillCouponHints |
( |
& |
$coupons | ) |
|
|
staticprotected |
◆ fillUserInfo()
static fillUserInfo |
( |
& |
$result, |
|
|
|
$existCoupon, |
|
|
|
$checkCode |
|
) |
| |
|
staticprotected |
Fill client information.
- Аргументы
-
array | &$result | Coupon data. |
array | $existCoupon | User data. |
int | $checkCode | Checked result. |
- Возвращает
- void
См. определение в файле discountcouponsmanagerbase.php строка 1737
◆ filterArrayCoupons()
static filterArrayCoupons |
( |
& |
$coupons, |
|
|
|
$filter |
|
) |
| |
|
staticprotected |
◆ filterCoupons()
static filterCoupons |
( |
|
$filter, |
|
|
|
$getId = false |
|
) |
| |
|
staticprotected |
Filter manager coupons list.
- Аргументы
-
array | $filter | Filter for coupons. |
bool | $getId | Resturn Id or full data. |
- Возвращает
- array
См. определение в файле discountcouponsmanagerbase.php строка 2035
◆ filterFreezeCoupons()
static filterFreezeCoupons |
( |
|
$coupon | ) |
|
|
staticprotected |
◆ filterFreezeOrderedCoupons()
static filterFreezeOrderedCoupons |
( |
|
$coupon | ) |
|
|
staticprotected |
◆ filterOneRowCoupons()
static filterOneRowCoupons |
( |
|
$coupon, |
|
|
|
$hash |
|
) |
| |
|
staticprotected |
◆ filterOrderCoupons()
static filterOrderCoupons |
( |
|
$coupon | ) |
|
|
static |
◆ filterUniqueDiscount()
static filterUniqueDiscount |
( |
& |
$coupons | ) |
|
|
staticprotected |
◆ filterUnknownCoupons()
static filterUnknownCoupons |
( |
|
$coupon | ) |
|
|
staticprotected |
◆ finalApply()
◆ freezeCouponStorage()
static freezeCouponStorage |
( |
| ) |
|
|
static |
◆ get()
static get |
( |
|
$extMode = true , |
|
|
|
$filter = array() , |
|
|
|
$show = false , |
|
|
|
$final = false |
|
) |
| |
|
static |
Get coupons list.
- Аргументы
-
bool | $extMode | Get full information or coupons only. |
array | $filter | Coupons filter. |
bool | $show | Get for show or apply. |
bool | $final | Change status ENTERED to NOT_APPLIED. |
- Возвращает
- array|bool
См. определение в файле discountcouponsmanagerbase.php строка 804
◆ getCatalogProductHash()
static getCatalogProductHash |
( |
|
$product | ) |
|
|
staticprotected |
Create catalog product hash for old custom providers.
- Аргументы
-
array | $product | Product description. |
- Возвращает
- string
См. определение в файле discountcouponsmanagerbase.php строка 2223
◆ getCheckCodeList()
static getCheckCodeList |
( |
|
$extendedMode = false | ) |
|
|
static |
Returns check code list.
- Аргументы
-
bool | $extendedMode | Get codes or codes with description. |
- Возвращает
- array
См. определение в файле discountcouponsmanagerbase.php строка 321
◆ getCheckCodeMessage()
static getCheckCodeMessage |
( |
|
$code | ) |
|
|
static |
◆ getData()
static getData |
( |
|
$coupon, |
|
|
|
$checkCoupon = true |
|
) |
| |
|
static |
Returns information about coupon.
- Аргументы
-
string | $coupon | Coupon for search. |
bool | $checkCoupon | Check coupon data. |
- Возвращает
- array|false
См. определение в файле discountcouponsmanagerbase.php строка 1314
◆ getEmptyCouponFields()
static getEmptyCouponFields |
( |
|
$coupon | ) |
|
|
staticprotected |
◆ getEnteredCoupon()
static getEnteredCoupon |
( |
|
$coupon, |
|
|
|
$clearData = false |
|
) |
| |
|
static |
Returns entered coupon data.
- Аргументы
-
string | $coupon | Coupon code. |
bool | $clearData | Clear data for save order coupon. |
- Возвращает
- bool|array
@noinspection PhpUndefinedMethodInspection
@noinspection PhpUndefinedMethodInspection
См. определение в файле discountcouponsmanagerbase.php строка 1458
◆ getErrors()
◆ getForApply()
static getForApply |
( |
|
$filter, |
|
|
|
$product = array() , |
|
|
|
$uniqueDiscount = false |
|
) |
| |
|
static |
Get coupons list for apply.
- Аргументы
-
array | $filter | Coupons filter. |
array | $product | Product description. |
bool | $uniqueDiscount | Get one coupon for discount. |
- Возвращает
- array|bool
См. определение в файле discountcouponsmanagerbase.php строка 848
◆ getOrderedCoupons()
static getOrderedCoupons |
( |
|
$extMode = true , |
|
|
|
$filter = array() |
|
) |
| |
|
static |
Returns coupons for current order.
- Аргументы
-
bool | $extMode | Get full information or coupons only. |
array | $filter | Coupons filter. |
- Возвращает
- array
См. определение в файле discountcouponsmanagerbase.php строка 895
◆ getOrderId()
◆ getProductHash()
static getProductHash |
( |
|
$product | ) |
|
|
staticprotected |
◆ getRegistryType()
static getRegistryType |
( |
| ) |
|
|
static |
◆ getSession()
◆ getStatusList()
static getStatusList |
( |
|
$extendedMode = false | ) |
|
|
static |
Returns coupon status list.
- Аргументы
-
bool | $extendedMode | Get status Ids or Ids with description. |
- Возвращает
- array
См. определение в файле discountcouponsmanagerbase.php строка 293
◆ getUseMode()
◆ getUserId()
◆ init()
static init |
( |
|
$mode = self::MODE_CLIENT , |
|
|
|
$params = array() , |
|
|
|
$clearStorage = false |
|
) |
| |
|
static |
Initialization coupon manager.
- Аргументы
-
int | $mode | Discount manager mode. |
array | $params | Initial params (userId, orderId, oldUserId) keys are case sensitive:
-
int userId Order owner (for MODE_MANAGER or MODE_ORDER only)
-
int orderId Edit order id (for MODE_ORDER only(!))
-
int oldUserId Old order owner for MODE_MANAGER or MODE_ORDER only)
. |
bool | $clearStorage | Clear coupon session storage. |
- Возвращает
- void
См. определение в файле discountcouponsmanagerbase.php строка 443
◆ initUseDiscount()
static initUseDiscount |
( |
| ) |
|
|
staticprotected |
◆ initUseMode()
static initUseMode |
( |
|
$mode = self::MODE_CLIENT , |
|
|
|
$params = array() |
|
) |
| |
|
static |
Init use mode and user id.
- Аргументы
-
int | $mode | Discount manager mode. |
array | $params | Initial params (userId, orderId, oldUserId) keys are case sensitive:
-
int userId Order owner (for MODE_MANAGER or MODE_ORDER only)
-
int orderId Edit order id (for MODE_ORDER only(!))
-
int oldUserId Old order owner for MODE_MANAGER or MODE_ORDER only)
. |
- Возвращает
- void
См. определение в файле discountcouponsmanagerbase.php строка 103
◆ initUserId()
◆ isEntered()
◆ isExist()
static isExist |
( |
|
$coupon | ) |
|
|
static |
◆ isFrozenCouponStorage()
static isFrozenCouponStorage |
( |
| ) |
|
|
static |
◆ isSuccess()
◆ isUsedOrderCouponsForApply()
static isUsedOrderCouponsForApply |
( |
| ) |
|
|
static |
◆ logout()
◆ migrateStorage()
static migrateStorage |
( |
|
$oldUser | ) |
|
|
static |
◆ reInit()
static reInit |
( |
|
$mode = self::MODE_CLIENT , |
|
|
|
$params = array() , |
|
|
|
$clearStorage = false |
|
) |
| |
|
static |
Unconditional reinitialization coupon manager.
- Аргументы
-
int | $mode | Discount manager mode. |
array | $params | Initial params (userId, orderId, oldUserId) keys are case sensitive:
-
int userId Order owner (for MODE_MANAGER or MODE_ORDER only)
-
int orderId Edit order id (for MODE_ORDER only(!))
-
int oldUserId Old order owner for MODE_MANAGER or MODE_ORDER only)
. |
bool | $clearStorage | Clear coupon session storage. |
- Возвращает
- void
См. определение в файле discountcouponsmanagerbase.php строка 505
◆ saveApplied()
◆ saveToStorage()
◆ setApply()
static setApply |
( |
|
$coupon, |
|
|
|
$data |
|
) |
| |
|
static |
Set applied information for basket.
- Аргументы
-
string | $coupon | Coupon. |
array | $data | Apply data (basket, delivery). |
- Возвращает
- bool
См. определение в файле discountcouponsmanagerbase.php строка 1150
◆ setApplyByProduct()
static setApplyByProduct |
( |
|
$product, |
|
|
|
$couponsList, |
|
|
|
$oldMode = false |
|
) |
| |
|
static |
Set applied information for product.
- Аргументы
-
array | $product | Product description. |
array | $couponsList | Coupons for product. |
bool | $oldMode | Compatibility mode with old custom providers. |
- Возвращает
- bool
См. определение в файле discountcouponsmanagerbase.php строка 1090
◆ setCoupons()
static setCoupons |
( |
|
$couponsList, |
|
|
|
$checkCoupons = true |
|
) |
| |
|
staticprotected |
Set coupons list.
- Аргументы
-
array | $couponsList | Coupons list. |
bool | $checkCoupons | Find coupons. |
- Возвращает
- void
См. определение в файле discountcouponsmanagerbase.php строка 2293
◆ setUseOnlySaleDiscounts()
static setUseOnlySaleDiscounts |
( |
|
$mode | ) |
|
|
static |
◆ unFreezeCouponStorage()
static unFreezeCouponStorage |
( |
| ) |
|
|
static |
◆ usedByClient()
◆ usedByExternal()
static usedByExternal |
( |
| ) |
|
|
static |
◆ usedByManager()
◆ useSavedCouponsForApply()
static useSavedCouponsForApply |
( |
|
$state | ) |
|
|
static |
◆ verifyApplied()
◆ $allowCouponStorage
◆ $allowedSave
◆ $checkActivity
◆ $clearFields
Инициализатор= array(
'STATUS', 'CHECK_CODE',
'DISCOUNT_NAME', 'DISCOUNT_ACTIVE',
'SAVED',
'BASKET', 'DELIVERY'
)
См. определение в файле discountcouponsmanagerbase.php строка 69
◆ $couponIndex
◆ $couponProviders
$couponProviders = array() |
|
staticprotected |
◆ $coupons
◆ $couponTypes
◆ $errors
◆ $init
◆ $onlySaleDiscount
◆ $orderId
◆ $timeFields
Инициализатор= array(
'DISCOUNT_ACTIVE_FROM', 'DISCOUNT_ACTIVE_TO', 'ACTIVE_FROM', 'ACTIVE_TO'
)
См. определение в файле discountcouponsmanagerbase.php строка 75
◆ $useMode
$useMode = self::MODE_CLIENT |
|
staticprotected |
◆ $useOrderCoupons
◆ $userId
◆ COUPON_CHECK_ALREADY_MAX_USED
const COUPON_CHECK_ALREADY_MAX_USED = 0x0100 |
◆ COUPON_CHECK_BAD_USER_ID
const COUPON_CHECK_BAD_USER_ID = 0x0080 |
◆ COUPON_CHECK_CORRUPT_DATA
const COUPON_CHECK_CORRUPT_DATA = 0x0400 |
◆ COUPON_CHECK_NO_ACTIVE
const COUPON_CHECK_NO_ACTIVE = 0x0002 |
◆ COUPON_CHECK_NO_ACTIVE_DISCOUNT
const COUPON_CHECK_NO_ACTIVE_DISCOUNT = 0x0010 |
◆ COUPON_CHECK_NOT_APPLIED
const COUPON_CHECK_NOT_APPLIED = 0x0800 |
◆ COUPON_CHECK_NOT_FOUND
const COUPON_CHECK_NOT_FOUND = 0x0001 |
◆ COUPON_CHECK_OK
const COUPON_CHECK_OK = 0x0000 |
◆ COUPON_CHECK_RANGE_ACTIVE_FROM
const COUPON_CHECK_RANGE_ACTIVE_FROM = 0x0004 |
◆ COUPON_CHECK_RANGE_ACTIVE_FROM_DISCOUNT
const COUPON_CHECK_RANGE_ACTIVE_FROM_DISCOUNT = 0x0020 |
◆ COUPON_CHECK_RANGE_ACTIVE_TO
const COUPON_CHECK_RANGE_ACTIVE_TO = 0x0008 |
◆ COUPON_CHECK_RANGE_ACTIVE_TO_DISCOUNT
const COUPON_CHECK_RANGE_ACTIVE_TO_DISCOUNT = 0x0040 |
◆ COUPON_CHECK_UNKNOWN_TYPE
const COUPON_CHECK_UNKNOWN_TYPE = 0x0200 |
◆ COUPON_MODE_FULL
const COUPON_MODE_FULL = 0x0002 |
◆ COUPON_MODE_SIMPLE
const COUPON_MODE_SIMPLE = 0x0001 |
◆ EVENT_ON_BUILD_COUPON_PROVIDES
const EVENT_ON_BUILD_COUPON_PROVIDES = 'onBuildCouponProviders' |
◆ EVENT_ON_COUPON_ADD
const EVENT_ON_COUPON_ADD = 'onManagerCouponAdd' |
◆ EVENT_ON_COUPON_APPLY
const EVENT_ON_COUPON_APPLY = 'onManagerCouponApply' |
◆ EVENT_ON_COUPON_APPLY_PRODUCT
const EVENT_ON_COUPON_APPLY_PRODUCT = 'onManagerCouponApplyByProduct' |
◆ EVENT_ON_COUPON_DELETE
const EVENT_ON_COUPON_DELETE = 'onManagerCouponDelete' |
◆ EVENT_ON_SAVE_APPLIED_COUPONS
const EVENT_ON_SAVE_APPLIED_COUPONS = 'onManagerSaveApplied' |
◆ MODE_CLIENT
const MODE_CLIENT = 0x0001 |
◆ MODE_EXTERNAL
const MODE_EXTERNAL = 0x0010 |
◆ MODE_MANAGER
const MODE_MANAGER = 0x0002 |
◆ MODE_ORDER
const MODE_ORDER = 0x0004 |
◆ MODE_SYSTEM
const MODE_SYSTEM = 0x0008 |
◆ STATUS_APPLYED
const STATUS_APPLYED = 0x0004 |
◆ STATUS_ENTERED
const STATUS_ENTERED = 0x0002 |
◆ STATUS_FREEZE
const STATUS_FREEZE = 0x0010 |
◆ STATUS_NOT_APPLYED
const STATUS_NOT_APPLYED = 0x0008 |
◆ STATUS_NOT_FOUND
const STATUS_NOT_FOUND = 0x0001 |
◆ STORAGE_CLIENT_COUPONS
const STORAGE_CLIENT_COUPONS = 'CATALOG_USER_COUPONS' |
◆ STORAGE_MANAGER_COUPONS
const STORAGE_MANAGER_COUPONS = 'CATALOG_MANAGE_COUPONS' |