Hi
I'm trying to show related products to an item. I have a product item field in my item where I've attached som products. I'm showing the list of items with the item publisher module. I have the following in my template:
<div class="products"> <h3>Relaterede produkter</h3> @foreach(var list in GetLoop("ItemPublisher:Items.List")){ foreach(var product in list.GetLoop("ItemPublisher:Item.Products")){ if(!string.IsNullOrEmpty(product.GetString("Ecom:Product.ImageLarge.Clean"))){ <a href='@product.GetString("Ecom:Product.ImageLarge.Clean")' title='@product.GetString("Ecom:Product.Name")' class="thumbnail product-image-zoomed" data-target="#productImagesSlider"> <img src='/Admin/Public/getimage.ashx?Image=@product.GetString("Ecom:Product.ImageLarge.Clean")&Width=100' alt="" data-full-image='@product.GetString("Ecom:Product.ImageLarge.Clean")'> </a> } <h5><a href="productlist?ProductID=@product.GetString("Ecom:Product.ID")" title='@product.GetString("Ecom:Product.Name")'>@product.GetString("Ecom:Product.Name")</a></h5> } } </div>
The problem is that all products from ALL items get shown under EVERY item in the list of items.
Does anybody know what I'm doing wrong?
Regards Thomas