StockLocations
Summary
The StockLocations
loop lets you display information about the stock locations for a product.
Remarks
Stock locations are created in Management center > Ecommerce > Product catalog > Stock location.
Examples
Basic usage
Notice the use of @item.GetValue to get data from the loop variable.
If you just write @GetValue, the data will be taken from outside the loop.
Similarly, you have to use @item.GetLoop to use loops inside a loop.
Check if the loop exists
Example of usage
The following general example illustrates how to use a loop construct.
Check if the loop exists
Available tags
Ecom:StockLocation.ID
Returns the ID of the stock location.
@GetInteger("Ecom:StockLocation.ID")
Ecom:StockLocation.Name
Returns the name of the stock location.
@GetString("Ecom:StockLocation.Name")
Ecom:StockLocation.Quantity
Returns the amount/quantity of products registered at the stock location.
@GetDouble("Ecom:StockLocation.Quantity")
Ecom:StockLocation.Volume
Returns the volume of the stock unit.
@GetDouble("Ecom:StockLocation.Volume")
Ecom:StockLocation.Weight
Returns the weight of the stock unit.
@GetDouble("Ecom:StockLocation.Weight")
Available loops
StockUnit
The StockLocations
loop lets you display information about the stock unit for a product.
@foreach (LoopItem item in GetLoop("StockUnit")){ <p>@item.GetValue("TagName")</p> }