Ecom:Order.TotalDiscount

Version: - price  

Summary

Returns the total discount for the order.

Settings

The value is generated automatically.

Remarks

Includes the option to add price extensions in order to format the amount. See Price extensions (Prefix : Ecom:Order.TotalDiscount).

Examples

Outputting the template tag

@GetPrice("Ecom:Order.TotalDiscount")

Check if tag has a value

@if(!double.IsNullOrWhiteSpace(GetPrice("Ecom:Order.TotalDiscount"))) { @* Tag has value, so let's do something useful here. *@ }

Assign tag to a value for later use

@{ double storedTag = GetPrice("Ecom:Order.TotalDiscount"); }

Outputting the template tag

<!--@Ecom:Order.TotalDiscount-->

Check if price has a value

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