Ecom:Product.Discount.ValidTo

Version: 9.6.10 date  

Summary

Returns the end date of the discount validity.

Settings

The value is based on the Valid to control value in the General section for discount.

(Ecommerce > Discounts&Offers > a discount > General section > Valid to)

Examples

Outputting the template tag

@GetDate("Ecom:Product.Discount.ValidTo")

Check if tag has a value

@if(!string.IsNullOrWhiteSpace(GetDate("Ecom:Product.Discount.ValidTo"))) { @* Tag has value, so let's do something useful here. *@ }

Assign tag to a value for later use

@{ string storedTag = GetDate("Ecom:Product.Discount.ValidTo"); }

Outputting the template tag

<!--@Ecom:Product.Discount.ValidTo-->

Check if date has a value

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