Click or drag to resize
MultiBuyDiscountsEvaluator Class
Class handling application of multi buy discounts on set of cart items. Discounts are based on the most expensive products. Discounts are applied to cheapest products.
Inheritance Hierarchy
SystemObject
  CMS.EcommerceMultiBuyDiscountsEvaluator

Namespace: CMS.Ecommerce
Assembly: CMS.Ecommerce (in CMS.Ecommerce.dll) Version: 10.0.0
Syntax
C#
public class MultiBuyDiscountsEvaluator

The MultiBuyDiscountsEvaluator type exposes the following members.

Constructors
  NameDescription
Public methodMultiBuyDiscountsEvaluator
Creates a new instance of applicator for given cart items.
Top
Properties
  NameDescription
Public propertyApplicator
MultiBuy discounts applicator to be used for application of items.
Protected propertyPrioritizedItems
List of cart items currently processed by this applicator.
Protected propertySortedItems
Cart items sorted by price.
Top
Methods
  NameDescription
Protected methodApplyDiscount
Applies discount to given number of unit of given item using.
Protected methodCanBaseDiscountOn
Checks if given item can be used to fulfill discounts conditions.
Protected methodCanBeDiscounted
Checks if given item can be discounted using given discount.
Public methodEvaluateDiscounts
Evaluates given discounts and applies matching ones to corresponding cart items.
Protected methodFindItemsToBaseDiscountOn
Finds items satisfying given discounts conditions.
Protected methodFindItemsToBeDiscounted
Finds items to be discounted with given discount based on given items. Returns true when at least one item was found.
Protected methodGetUnusedNonFreeUnits
Returns the number of unit not used as base for any discount nor discounted.
Protected methodPrepareItemsForDiscount
Ensures that PrioritizedItems list is ready for application of given discount.
Protected methodRememberUsedItems
Remembers that given items in given number of units were used for given discount.
Protected methodReset
Resets evaluator to its initial state.
Top
See Also