DiscountCouponsManager
DiscountCouponsManager class for handling discount coupons in calculations.
Class methods
Method | Description | Available from version |
---|---|---|
add | Adds coupon to calculations. | |
clear | Removes entered coupons on a current hit. | |
clearApply | Removes applied coupon information. | |
clearApplyCoupon | Removes applied coupon information. | |
clearByOrder | Removes entered coupons in order. | |
clearErrors | Clears list of errors. | |
delete | Deletes coupon from calculations. | |
deleteApplyByProduct | Removes applied information for product. | |
finalApply | Updates status for saved coupons. | |
get | Returns list of coupons. | |
getCheckCodeList | Returns list of coupon status codes. | |
getData | Returns coupon information. | |
getEnteredCoupon | When coupon is not yet added, executes attempt to add it. Returns coupon data on success. | |
getErrors | Returns list of errors. | |
getForApply | Returns list of coupons to be applied. | |
getOrderId | When handling coupons for saved order, method returns this order ID. | |
getStatusList | Returns list of coupon statuses. | |
getUseMode | Returns coupon handling mode. | |
getUserId | Returns user ID. | |
init | Initializes coupon manager. | |
initUseMode | Enables coupons and user ID. | |
isEntered | When coupon is entered, method returns true, otherwise returns false. | |
isExist | When coupon with $coupon code exists, method returns array of coupon parameters. |
|
isSuccess | Returns true, when performed operation is successful. | |
load | Loads coupons for existing order. | |
logout | Clears coupon storage when exiting from authorized session in public site section. | |
migrateStorage | Updates storage IDin admin section after changing customer for an order. | |
reInit | Reinitializes coupon manager. | |
saveApplied | Saves applied coupons. | |
setApply | Saves in memory the information on applied coupons on a hit. | |
setApplyByProduct | Saves in memory the information on coupons applied to product. | |
usedByClient | Returns true, when coupon manager was launched from public site section. | |
usedByExternal | Returns true, when order was checked out in the external commecrcial platform. | |
usedByManager | Returns true, when coupon handling is performed from admin section. |
© «Bitrix24», 2001-2024