ProductRelatedGroups
Summary
The ProductRelatedGroups loop lets you display information about related product groups for a product.
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:Product:RelatedGroup.GroupID
Returns the ID of the related group.
@GetString("Ecom:Product:RelatedGroup.GroupID")
Ecom:Product:RelatedGroup.LanguageID
Returns the ID of the language used for the related group.
@GetString("Ecom:Product:RelatedGroup.LanguageID")
Ecom:Product:RelatedGroup.Name
Returns the name of the related group.
@GetString("Ecom:Product:RelatedGroup.Name")
Available loops
CustomFieldList
The CustomFieldList loop lets you display information about custom product fields.
@foreach (LoopItem item in GetLoop("CustomFieldList")){
<p>@item.GetValue("TagName")</p>
}
OrderContexts
The OrderContexts loop lets you display various information about the order context carts that are rendered in the current context.
@foreach (LoopItem item in GetLoop("OrderContexts")){
<p>@item.GetValue("TagName")</p>
}
Products
The Products loop lets you display information about products within the product group.
@foreach (LoopItem item in GetLoop("Products")){
<p>@item.GetValue("TagName")</p>
}
RelatedProducts
The RelatedProducts loop lets you display available information about rproduct within a related group.
@foreach (LoopItem item in GetLoop("RelatedProducts")){
<p>@item.GetValue("TagName")</p>
}