SaaS CMS has officially launched! Learn more now.

Class PriceCalculationBase

This class is intended to be used internally by EPiServer. We do not support any backward compatibility on this.

Inheritance
System.Object
PriceCalculationBase
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: EPiServer.Commerce.Marketing.Internal
Assembly: EPiServer.Business.Commerce.dll
Version: 11.8.3
Syntax
public abstract class PriceCalculationBase

Constructors

PriceCalculationBase()

Declaration
protected PriceCalculationBase()

Methods

ApplyDiscountProportionally(IEnumerable<PriceEntry>, Decimal, Decimal, Currency)

Apply a fixed money-off discount across all the entries.

Declaration
protected decimal ApplyDiscountProportionally(IEnumerable<PriceEntry> entries, decimal totalAmount, decimal discountAmount, Currency currency)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<PriceEntry> entries

The entries to be discounted.

System.Decimal totalAmount

The initial total cost of the entries.

System.Decimal discountAmount

The amount to discount across all entries.

Currency currency

The currency to use for rounding rules.

Returns
Type Description
System.Decimal

The saved amount, 0 if no discount was applied.