Hi Guys,
I am trying to list related products of a product in Razor
1) Product catalog module is on the page
2) Product has related products "attached" to it.
3) If I am using original HTML template, related products are being listed as they should
so:
<!--@LoopStart(ProductRelatedGroups)--> <!--@LoopStart(RelatedProducts)--> <h3><!--@Ecom:Product.Name--></h3><br/> <!--@LoopEnd(RelatedProducts)--> <!--@LoopEnd(ProductRelatedGroups)-->
this Works, but only if I am using HTML template!
Problem happens when I am trying to use Razor template
This is how I am trying to get it (inslide Product.CSHTML):
@{ foreach (LoopItem i in GetLoop("ProductRelatedGroups")){ foreach (LoopItem i2 in GetLoop("RelatedProducts")){ <text>@i2.GetValue("Ecom:Product.Name")</text> } } }
Any suggestions? :(
//Dmitri