Ecom:Product.Stock
Version: - doubleSummary
Returns the number of products in stock.
Settings
The value is based on the Stock level input field for a product.
(Ecommerce > Product Catalog > Shop > Product group > Product > Details)
Examples
Outputting the template tag
@GetDouble("Ecom:Product.Stock")
Check if tag has a value
@if(!double.IsNullOrWhiteSpace(GetDouble("Ecom:Product.Stock"))) {
@* Tag has value, so let's do something useful here. *@
}
Assign tag to a value for later use
@{
double storedTag = GetDouble("Ecom:Product.Stock");
}
Outputting the template tag
<!--@Ecom:Product.Stock-->
Check if double has a value
<!--@If Defined(@Ecom:Product.Stock)-->
Let's output this tag here: <strong><!--@Ecom:Product.Stock--></strong>
<!--@EndIf(@Ecom:Product.Stock)-->