Developer forum

Forum » Templates » Multiple product images, product list

Multiple product images, product list

Martin Orvad
Reply
Hi

Is it possible to display multiple images for a product on a productlist?

If so, how? If no, why not?

Thanks

Martin


Replies

 
Vladimir
Reply
Hi Martin!
Yes, it possible. You can create several custom product fields of type file manager to store additional image file name and then, use it in your templates. For example:
<img src="/Admin/Public/GetImage.aspx?Image=/Files/Filer/<xsl:value-of select="Ecom.Product.Field.MyCustomFieldImg1.Value" />&Height=50" />

Best regards,
Vladimir

 
Martin Orvad
Reply
Yes, that would certainly be a solution. But I'm doing a redesign of an existing site, and all the extra images are stored in the 'Details - Images/Links' fields on the 'Media' tab on each product. See attachment.

Can I use those pictures on a productlist? If so, how? If no, why not? ;-)

Firefox1.png
 
Vladimir
Reply
Hi! Try to use these tags:
  <!--@LoopStart(Details)-->
  <!--@Ecom:Product:Detail.Image.Clean-->
  <!--@Ecom:Product:Detail.Image-->
  <!--@Ecom:Product:Detail.Text-->
  <!--@LoopEnd(Details)-->

Best regards,
Vladimir

 
Martin Orvad
Reply
Hi! Try to use these tags:
1
2
3
4
5
<!--@LoopStart(Details)-->
<!--@Ecom:Product:Detail.Image.Clean-->
<!--@Ecom:Product:Detail.Image-->
<!--@Ecom:Product:Detail.Text-->
<!--@LoopEnd(Details)-->


Yes, that's what I thought. But it doesn't seem to work on a product list template.

 
Nicolai Høeg Pedersen
Reply
That is because Details loop is not available in the lists - because of performance....

It can be done by making a product template extender with this code:
If Template.LoopExists("Details") Then
         RenderDetails(Product.Details, Template, "Details")
End If


 

You must be logged in to post in the forum