Ecom:Order:OrderLine.IsDiscount

Version: - string  

Summary

Returns "True" if the orderline is a discount. If not - an empty string is returned (e.g. if it's a product).

Settings

The value is generated automatically.

Remarks

You can use If Defined to find out if the orderline represents a product or not. This is used to hide e.g. increment/decrement links from the discount lines.

Examples

Outputting the template tag

@GetString("Ecom:Order:OrderLine.IsDiscount")

Check if tag has a value

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

Assign tag to a value for later use

@{ string storedTag = GetString("Ecom:Order:OrderLine.IsDiscount"); }

Outputting the template tag

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

Check if string has a value

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