Developer Resources for AbleCommerce eCommerce platform
CommerceBuilder.Marketing Namespace / VolumeDiscount Class / CalculateDiscount Method
Quantity of line item to be discounted.
Total quantity of all line items used to determine eligibility for discount.
Extended Price of product (or line item) to be discounted.
If grouping discount mode is enabled, this is the total Extended Price of all products from the same category; if line item discount mode is enabled, this should be the same value as lineItemValue.
Version
CalculateDiscount Method (VolumeDiscount)
Calculates the appropriate discount based on the defined levels.
Syntax

Parameters

lineItemQuantity
Quantity of line item to be discounted.
totalQuantity
Total quantity of all line items used to determine eligibility for discount.
lineItemValue
Extended Price of product (or line item) to be discounted.
totalValue
If grouping discount mode is enabled, this is the total Extended Price of all products from the same category; if line item discount mode is enabled, this should be the same value as lineItemValue.

Return Value

The calculated discount
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also