Ecom:Product.DefaultUnitID
Version: - stringSummary
Returns the ID of the chosen default unit for the product.
Settings
The value is based on the input in the Default
field under the Unit
tab for the product.
(Ecommerce > Product Catalog > Product group/product > Unit tab > Units - Default)
Examples
Outputting the template tag
@GetString("Ecom:Product.DefaultUnitID")
Check if tag has a value
@if(!string.IsNullOrWhiteSpace(GetString("Ecom:Product.DefaultUnitID"))) {
@* Tag has value, so let's do something useful here. *@
}
Assign tag to a value for later use
@{
string storedTag = GetString("Ecom:Product.DefaultUnitID");
}
Outputting the template tag
<!--@Ecom:Product.DefaultUnitID-->
Check if string has a value
<!--@If Defined(@Ecom:Product.DefaultUnitID)-->
Let's output this tag here: <strong><!--@Ecom:Product.DefaultUnitID--></strong>
<!--@EndIf(@Ecom:Product.DefaultUnitID)-->