Ecom:Product.AvailableAmount
Version: - doubleSummary
Returns the number of products that is available (Available amount = Amount in stock - Amount reserved).
Settings
The value is generated automatically.
Remarks
The tag is only working when "Minutes the products in cart are reserved - Reserve when product is added to cart" is enabled in Management center - Ecommerce - Advanced - General.
Examples
Outputting the template tag
@GetDouble("Ecom:Product.AvailableAmount")
Check if tag has a value
@if(!double.IsNullOrWhiteSpace(GetDouble("Ecom:Product.AvailableAmount"))) {
@* Tag has value, so let's do something useful here. *@
}
Assign tag to a value for later use
@{
double storedTag = GetDouble("Ecom:Product.AvailableAmount");
}
Outputting the template tag
<!--@Ecom:Product.AvailableAmount-->
Check if double has a value
<!--@If Defined(@Ecom:Product.AvailableAmount)-->
Let's output this tag here: <strong><!--@Ecom:Product.AvailableAmount--></strong>
<!--@EndIf(@Ecom:Product.AvailableAmount)-->