Ecom:Order:OrderLine.TotalDiscount

Version: 9.10.9 double  

Summary

Returns total discount amount for the current orderline. 

Settings

The value is generated automatically.

Remarks

This tag contains information about the total discount amount on the current orderline. This means that if you have a ProductDiscount on 10%, and the Product cost 100 dollar. The tag contains the value 10$, and if you decide to buy 4 of the same Product on an orderline, the tag shows 40$.

Examples

Outputting the template tag

@GetDouble("Ecom:Order:OrderLine.TotalDiscount")

Check if tag has a value

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

Assign tag to a value for later use

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

Outputting the template tag

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

Check if double has a value

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