Documentation

DiscountCouponsManager

DiscountCouponsManager class for handling discount coupons in calculations.

Class methods

MethodDescription Available from version
addAdds coupon to calculations.
clearRemoves entered coupons on a current hit.
clearApplyRemoves applied coupon information.
clearApplyCouponRemoves applied coupon information.
clearByOrderRemoves entered coupons in order.
clearErrorsClears list of errors.
deleteDeletes coupon from calculations.
deleteApplyByProductRemoves applied information for product.
finalApplyUpdates status for saved coupons.
getReturns list of coupons.
getCheckCodeListReturns list of coupon status codes.
getDataReturns coupon information.
getEnteredCouponWhen coupon is not yet added, executes attempt to add it. Returns coupon data on success.
getErrorsReturns list of errors.
getForApplyReturns list of coupons to be applied.
getOrderIdWhen handling coupons for saved order, method returns this order ID.
getStatusListReturns list of coupon statuses.
getUseModeReturns coupon handling mode.
getUserIdReturns user ID.
initInitializes coupon manager.
initUseModeEnables coupons and user ID.
isEnteredWhen coupon is entered, method returns true, otherwise returns false.
isExistWhen coupon with $coupon code exists, method returns array of coupon parameters.
isSuccessReturns true, when performed operation is successful.
loadLoads coupons for existing order.
logoutClears coupon storage when exiting from authorized session in public site section.
migrateStorageUpdates storage IDin admin section after changing customer for an order.
reInitReinitializes coupon manager.
saveAppliedSaves applied coupons.
setApply Saves in memory the information on applied coupons on a hit.
setApplyByProductSaves in memory the information on coupons applied to product.
usedByClientReturns true, when coupon manager was launched from public site section.
usedByExternalReturns true, when order was checked out in the external commecrcial platform.
usedByManagerReturns true, when coupon handling is performed from admin section.


© «Bitrix24», 2001-2024
Up