Version: - price  


Returns a dynamic calculated price for the product with the sales discount(s) subtracted.


The value is based on the input fields on the Prices tab for a product (Ecommerce > Product Catalog > Shop> Product group > Product > Prices tab) as well as the product discount created under the Sales Discounts settings (Ecommerce > Settings > Sales Discounts > Product Sales Discounts)


Includes the option to add price extensions in order to format the product price. See Price extensions (Prefix : Ecom:Product.Discount.Price).


Outputting the template tag


Check if tag has a value

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

Assign tag to a value for later use

@{ double storedTag = GetPrice("Ecom:Product.Discount.Price"); }

Outputting the template tag


Check if price has a value

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