ShoppingCartItemInfoProviderCalculateUnitAverageDiscountInternal Method |
Calculates average discount per shopping cart item unit.
If discount is applied to all units of the shopping cart item average discount is equal to unit discount. Result is in site main currency.
Namespace: CMS.EcommerceAssembly: CMS.Ecommerce (in CMS.Ecommerce.dll) Version: 9.0.0
Syntaxprotected virtual double CalculateUnitAverageDiscountInternal(
ShoppingCartItemInfo item,
IItemDiscount discount,
double subtotalDiscount
)
Parameters
- item
- Type: CMS.EcommerceShoppingCartItemInfo
Shopping cart item - discount
- Type: CMS.EcommerceIItemDiscount
Discount which should be applied to the shopping cart item - subtotalDiscount
- Type: SystemDouble
Calculated subtotal discount
Return Value
Type:
Double
See Also