Units
Summary
Related to VariantOptions
.
Remarks
The variant options is based on the fields in:
Management Center > Ecommerce settings > Product catalog > Variants > Variant group
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:VariantOption.ImgLarge
Returns the large image of the variant.
@GetString("Ecom:VariantOption.ImgLarge")
Ecom:VariantOption.ImgLarge.Clean
Returns an URL to the large image of the variant.
@GetObject("Ecom:VariantOption.ImgLarge.Clean")
Ecom:VariantOption.ImgMedium
Returns the medium image of the variant.
@GetString("Ecom:VariantOption.ImgMedium")
Ecom:VariantOption.ImgMedium.Clean
Returns an URL to the medium image of the variant.
@GetObject("Ecom:VariantOption.ImgMedium.Clean")
Ecom:VariantOption.ImgSmall
Returns the small image of the variant
@GetObject("Ecom:VariantOption.ImgSmall")
Ecom:VariantOption.ImgSmall.Clean
Returns an URL to the small image of the variant.
@GetObject("Ecom:VariantOption.ImgSmall.Clean")
Ecom:VariantOption.Name
Returns the name of the variant.
@GetObject("Ecom:VariantOption.Name")
Ecom:VariantOption.Selected
Returns True if the variant option is selected in frontend.
@GetObject("Ecom:VariantOption.Selected")
Available loops
VariantGroupProperties
The VariantGroupProperties
loop lets you display information about all properties of the variant's group..
@foreach (LoopItem item in GetLoop("VariantGroupProperties")){ <p>@item.GetValue("TagName")</p> }