Table of Contents

Class PriceCalculationResultItemBase<TProductIdentifier, TProductData>

Namespace
CMS.Commerce
Assembly
CMS.Commerce.dll

Represents the result of calculating prices for a single item in an order.

public class PriceCalculationResultItemBase<TProductIdentifier, TProductData> : IPriceCalculationResultItem<TProductIdentifier, TProductData> where TProductIdentifier : ProductIdentifier where TProductData : ProductData, new()

Type Parameters

TProductIdentifier

Product data identifier type.

TProductData

Product data type.

Inheritance
object
PriceCalculationResultItemBase<TProductIdentifier, TProductData>
Implements
IPriceCalculationResultItem<TProductIdentifier, TProductData>
Derived
Extension Methods

Remarks

Extend this class if you need to change the generic type of the product identifier. Extend PriceCalculationResultItem if you do not need to change the default identifier type of ProductIdentifier.

Constructors

PriceCalculationResultItemBase()

public PriceCalculationResultItemBase()

Properties

LineSubtotalAfterAllDiscounts

The price of all items after all applicable discounts were applied.

public decimal LineSubtotalAfterAllDiscounts { get; set; }

Property Value

decimal

Remarks

The discounts included are catalog discounts and proportion of order item promotion split by weight according to all items in the order.

LineSubtotalAfterLineDiscount

The price of all items after catalog discount was applied.

public decimal LineSubtotalAfterLineDiscount { get; set; }

Property Value

decimal

LineTaxAmount

Nominal amount of tax paid.

public decimal LineTaxAmount { get; set; }

Property Value

decimal

LineTotalPrice

The price of all items after all discounts were applied.

public decimal LineTotalPrice { get; set; }

Property Value

decimal

ProductData

Product data used for the calculation and calculation result.

public TProductData ProductData { get; init; }

Property Value

TProductData

ProductIdentifier

Unique identifier for the associated product in the cart. Used to link calculation logic to a specific cart item.

public TProductIdentifier ProductIdentifier { get; init; }

Property Value

TProductIdentifier

PromotionData

Promotion data.

public PriceCalculationResultItemPromotionData PromotionData { get; }

Property Value

PriceCalculationResultItemPromotionData

Quantity

Quantity.

public decimal Quantity { get; set; }

Property Value

decimal

TaxRate

Tax rate.

public decimal TaxRate { get; set; }

Property Value

decimal

TotalPriceDiscountAmount

public decimal TotalPriceDiscountAmount { get; set; }

Property Value

decimal

Methods

SetProductData(ProductData)

Internal "setter" for the ProductData to enable to use contravariance "out" in the IPriceCalculationResultItem<TProductIdentifier, TProductData> interface to support inherited subclasses of ProductData in the IPriceCalculationResultItem<TProductIdentifier, TProductData> interface.

public void SetProductData(ProductData productData)

Parameters

productData ProductData