Ecom:Product.Discount.Percent
Version: - doubleSummary
Returns the discount percentage.
Settings
The value is based on the Percentage field for the discount.
(Management Center - Ecommerce - Orders - Order discounts - Order discount - Discount - Discount Type - Percentage)
Remarks
The tag is only available if the discount type is PERCENT.
Examples
Outputting the template tag
@GetDouble("Ecom:Product.Discount.Percent")
Check if tag has a value
@if(!double.IsNullOrWhiteSpace(GetDouble("Ecom:Product.Discount.Percent"))) {
@* Tag has value, so let's do something useful here. *@
}
Assign tag to a value for later use
@{
double storedTag = GetDouble("Ecom:Product.Discount.Percent");
}
Outputting the template tag
<!--@Ecom:Product.Discount.Percent-->
Check if double has a value
<!--@If Defined(@Ecom:Product.Discount.Percent)-->
Let's output this tag here: <strong><!--@Ecom:Product.Discount.Percent--></strong>
<!--@EndIf(@Ecom:Product.Discount.Percent)-->