Documentation

OrderDiscountManager

OrderDiscountManager class for handling shopping cart discounts during calculations.

Class methods

MethodDescription Available from version
calculateApplyCouponsUsed for applying discounts with module coupons (except online Store module coupons) to products of saved order. Discounts are calculated from price, saved in order.
checkDiscountProviderChecks if discount provider exist for module.
createSimpleDescriptionCreates a simple description for an arbitrary shopping cart discount.
deleteByOrderDeletes information about applied order discounts.
formatArrayDescriptionReturns description of shopping cart discount (value and action) using passed data. Used for generating discount description at the order page.
formatDescriptionHelper method. Calls method formatDiscountDescription and depending on its returned value - returns string (on success) or false (on error).
formatDiscountDescriptionFormats shopping cart discount description, returns object.
getEditUrlReturns address for discount edit page in the site admin section.
getManagerConfigReturns current parameters for shopping cart manager.
initInitializes shopping cart discount manager.
loadResultFromDatabaseLoads complete information on applied discounts, price rounding off and order settings, necessary for discount calculations.
prepareDiscountDescriptionReturns shopping cart description.
saveCouponSaves a coupon.
saveDiscountConverts and saves shopping cart rule.
setManagerConfigSets parameters for shopping cart discount manager.


© «Bitrix24», 2001-2022
Up