Ecom:Product.Cost

Version: - string  

Summary

Returns the cost of the product (the expense for the product owner in bringing a product or service to market).

Settings

The value is based on the Cost field in the Default information section for a product.

(Ecommerce > Product Catalog > Shop > Product group > Product > Details > Default information - Cost)

Examples

Outputting the template tag

@GetString("Ecom:Product.Cost")

Check if tag has a value

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

Assign tag to a value for later use

@{ string storedTag = GetString("Ecom:Product.Cost"); }

Outputting the template tag

<!--@Ecom:Product.Cost-->

Check if string has a value

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