Click or drag to resize
MultiBuyDiscount Class
Class implementing multibuy discount from calculation point of view.
Inheritance Hierarchy
SystemObject
  CMS.EcommerceMultiBuyDiscount

Namespace: CMS.Ecommerce
Assembly: CMS.Ecommerce (in CMS.Ecommerce.dll) Version: 11.0.0
Syntax
C#
[SerializableAttribute]
public sealed class MultiBuyDiscount : IMultiBuyDiscount, 
	IDiscount, ICouponCodeApplication

The MultiBuyDiscount type exposes the following members.

Constructors
Properties
  NameDescription
Public propertyAppliedCouponCode
Applied coupon code.
Public propertyApplyFurtherDiscounts
Indicates if further discounts are to be applied if this discount applies.
Public propertyApplyOnUnitsCount
The number of discounted units.
Public propertyAutoAddEnabled
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.
Public propertyBasedOnUnitsCount
The number of products needed to enable this discount.
Public propertyDiscountGuid
Unique Guid identifier of the discount.
Public propertyDiscountName
Multibuy discount display name.
Public propertyDiscountUsesCoupons
Indicates if discount is applicable only with discount coupon.
Public propertyIsFlat
True - discount value is fix, False - discount value is relative.
Public propertyMaxApplication
Maximum number of possible usages of the discount. Zero or negative value is representing an unlimited application count.
Public propertyValue
Discount value. Value is percentage of fix, based on value of IsFlat.
Top
Methods
  NameDescription
Public methodAcceptsCoupon
Indicates if given coupon code is suitable for this discount. Returns false if this discount has no codes assigned.
Public methodApply
Logs discount usage.
Public methodCalculateDiscount
Calculates the discount value for given basePrice.
Public methodGetMissingProducts
Returns IDs of SKUs which could be discounted if present in cart. Most important products go first.
Public methodIsApplicableOn
Indicates if this discount is affecting the price of given cart item, i.e. this method returns true for items discounted by this discount.
Public methodIsBasedOn
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.
Public methodPrioritizeItems
Moves Y items to higher priorities in case of BXGY discount.
Top
See Also