I would like to use an XSLT template for a product detail page.
The page must include related products, grouped by the related product groups.
So far I have managed to show the related product groups and their names.
Example:
<xsl:for-each select="loop[@name='ProductRelatedGroups']/item">
<h2>
<xsl:value-of select="Ecom.Product.RelatedGroup.Name"/>
</h2>
</xsl:for-each>
However I can't figure out how to show a list of related product for each group.
I tried to make it in an HTML template, convert it to XSLT - but that didn't work.
Example (no product output)
<xsl:for-each select="loop[@name='ProductRelatedGroups']/item">
<h2>
<xsl:value-of select="Ecom.Product.RelatedGroup.Name"/>
</h2>
<xsl:for-each select="loop[@name='Products']/item">
<xsl:value-of select="Ecom.Product.Link" disable-output-escaping="yes"/>
</xsl:for-each>
</xsl:for-each>
Developer forum
Related products in XSLT template
Replies
You must be logged in to post in the forum