Ecom:Product.Discount.TotalAmount
Version: - priceSummary
Returns a dynamic calculated amount of discount for the product.
Settings
The value is is based on the calculated sales discounts for the product.
Remarks
Includes the option to add price extensions in order to format the product price. See Price extensions (Prefix : Ecom:Product.Discount.Price).
Examples
Outputting the template tag
@GetPrice("Ecom:Product.Discount.TotalAmount")
Check if tag has a value
@if(!double.IsNullOrWhiteSpace(GetPrice("Ecom:Product.Discount.TotalAmount"))) {
@* Tag has value, so let's do something useful here. *@
}
Assign tag to a value for later use
@{
double storedTag = GetPrice("Ecom:Product.Discount.TotalAmount");
}
Outputting the template tag
<!--@Ecom:Product.Discount.TotalAmount-->
Check if price has a value
<!--@If Defined(@Ecom:Product.Discount.TotalAmount)-->
Let's output this tag here: <strong><!--@Ecom:Product.Discount.TotalAmount--></strong>
<!--@EndIf(@Ecom:Product.Discount.TotalAmount)-->