MultiBuyDiscount Class |
Namespace: CMS.Ecommerce
[SerializableAttribute] public sealed class MultiBuyDiscount : IMultiBuyDiscount, IDiscount, ICouponCodeApplication
The MultiBuyDiscount type exposes the following members.
Name | Description | |
---|---|---|
MultiBuyDiscount(MultiBuyDiscountInfo, Decimal, String) |
Creates new instance of absolute MultiBuyDiscount based on the specified MultiBuyDiscountInfo.
| |
MultiBuyDiscount(MultiBuyDiscountInfo, FuncDecimal, Decimal, String) |
Creates a new instance of relative MultiBuyDiscount based on the specified MultiBuyDiscountInfo.
|
Name | Description | |
---|---|---|
AppliedCouponCode |
Applied coupon code.
| |
ApplyFurtherDiscounts |
Indicates if further discounts are to be applied if this discount applies.
| |
ApplyOnUnitsCount |
The number of discounted units.
| |
AutoAddEnabled |
Indicates if product is added to cart automatically, the system adds product to shopping cart only when the discount is percentage and set 100 % off.
| |
BasedOnUnitsCount |
The number of products needed to enable this discount.
| |
DiscountGuid |
Unique Guid identifier of the discount.
| |
DiscountName |
Multibuy discount display name.
| |
DiscountUsesCoupons |
Indicates if discount is applicable only with discount coupon.
| |
IsFlat |
True - discount value is fix, False - discount value is relative.
| |
MaxApplication |
Maximum number of possible usages of the discount. Zero or negative value is representing an unlimited application count.
| |
Value |
Discount value. Value is percentage of fix, based on value of IsFlat.
|
Name | Description | |
---|---|---|
AcceptsCoupon |
Indicates if given coupon code is suitable for this discount. Returns false if this discount has no codes assigned.
| |
Apply |
Logs discount usage.
| |
CalculateDiscount |
Calculates the discount value for given basePrice.
| |
GetMissingProducts |
Returns IDs of SKUs which could be discounted if present in cart. Most important products go first.
| |
IsApplicableOn |
Indicates if this discount is affecting the price of given cart item, i.e. this method returns true for items
discounted by this discount.
| |
IsBasedOn |
Indicates if this discount is based on given cart item, i.e. this method returns true for items needed
to be in the cart to be eligible to get this discount.
| |
PrioritizeItems |
Moves Y items to higher priorities in case of BXGY discount.
|