Ecom:Product.Discount.Discount.Class

Version: - string  

Summary

Returns how the discount is applied to an order. 

Settings

The value is based on the Apply as field for the discount.

(Management Center - Ecommerce - Orders - Order discounts - Order discount - Discount - Apply as)

Remarks

The different class types:

  • OrderDiscountWithOtherDiscounts
    Order discount (inclusive). This discount will be calculated after all other orderline discounts have been calculated - based on the discounted price.

  • OrderDiscount
    Order discount (exclusive):This discount will be calculated based on the order price before any other discounts have been added.

  • OrderLineDiscount 
    Orderline discount (exclusive): This discount will be calculated based on the product price before any other discounts have been added.

Examples

Outputting the template tag

@GetString("Ecom:Product.Discount.Discount.Class")

Check if tag has a value

@if(!string.IsNullOrWhiteSpace(GetString("Ecom:Product.Discount.Discount.Class"))) { @* Tag has value, so let's do something useful here. *@ }

Assign tag to a value for later use

@{ string storedTag = GetString("Ecom:Product.Discount.Discount.Class"); }

Outputting the template tag

<!--@Ecom:Product.Discount.Discount.Class-->

Check if string has a value

<!--@If Defined(@Ecom:Product.Discount.Discount.Class)--> Let's output this tag here: <strong><!--@Ecom:Product.Discount.Discount.Class--></strong> <!--@EndIf(@Ecom:Product.Discount.Discount.Class)-->