Ecom:Product:Stock.Image
Version: - stringSummary
Returns the icon of the stock state.
Settings
The value is based on Stock status selection for the product and the Icon field for the stock state.
(Management Center - Ecommerce - Orders - Stock state - Stock state - Status)
Remarks
The value is returned as a HTML code snippet containing an <img>
tag.
Examples
Outputting the template tag
@GetString("Ecom:Product:Stock.Image")
Check if tag has a value
@if(!string.IsNullOrWhiteSpace(GetString("Ecom:Product:Stock.Image"))) {
@* Tag has value, so let's do something useful here. *@
}
Assign tag to a value for later use
@{
string storedTag = GetString("Ecom:Product:Stock.Image");
}
Outputting the template tag
<!--@Ecom:Product:Stock.Image-->
Check if string has a value
<!--@If Defined(@Ecom:Product:Stock.Image)-->
Let's output this tag here: <strong><!--@Ecom:Product:Stock.Image--></strong>
<!--@EndIf(@Ecom:Product:Stock.Image)-->