Ecom:StockUnit.UnitID

Version: - string  

Summary

Returns the ID of the stock unit.

Settings

The value is generated automatically but is based on the Unit field for the stock location selected in Stock for the product.

(Ecommerce > Product catalog > Shop > Group > Product > Stock > Edit stock info > Unit)

Remarks

Stock locations are created in Management center > Ecommerce > Product catalog > Units.

Examples

Outputting the template tag

@GetString("Ecom:StockUnit.UnitID")

Check if tag has a value

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

Assign tag to a value for later use

@{ string storedTag = GetString("Ecom:StockUnit.UnitID"); }

Outputting the template tag

<!--@Ecom:StockUnit.UnitID-->

Check if string has a value

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