Version: - boolean  


Returns the value "True" if the product has a discount - if not an empty string is returned.


The value is generated automatically.


The tag can be used in If defined to show elements only on products with a discunt.

The tag is only visible in the template tag list when you have an active product discount.


Outputting the template tag


Check if tag has a value

@if(!bool.IsNullOrWhiteSpace(GetBoolean("Ecom:Product.HaveDiscount"))) { @* Tag has value, so let's do something useful here. *@ }

Assign tag to a value for later use

@{ bool storedTag = GetBoolean("Ecom:Product.HaveDiscount"); }

Outputting the template tag


Check if boolean has a value

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