Developer forum

Forum » Ecommerce - Standard features » How to use Product Groups

How to use Product Groups

David Alexandersson
Reply

Im trying to Loop through 3 different product groups to list the products under the product groups. 

But it doesnt seem to be any way of doing this? I tried using templateTags to see what i can render, but the only productrelated field seems to be "product count".

This is my code, and as you can see i want to render the name of each product under the Group name. It works with the Group, but not in the product loop.

 

 

 @foreach (LoopItem productGroup in GetLoop("ProductGroups")){

@productGroup.GetString("Ecom:Group.Name")

foreach (LoopItem product in productGroup.GetLoop("Products")) {

@product.GetString("Ecom:Product.Name")

} }

Replies

 

You must be logged in to post in the forum