Hi there,
I'm working on an e-commerce project in wich we need to use some XSLT to make use of some custom fields (in our example: Ecom.Product.Field.RemovableFootbedStamp.Value).
The problem is that when we convert the html template into xslt, some of the previous used values are no longer filled. For example, Ecom.Product.ImageLarge.Clean no longer contains a value, while looking at the same page with an html template the image is displayed correctly. This problems occur with Images, but also with the LoopCounter and AssociatedGroups and ...
Is there anyone who encountered this problem, or someone who knows a solution to solve this problem?
Thanks!
Tom
XSLT:..............................................................................................................
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >
<xsl:output method="html" omit-xml-declaration="yes" indent="yes" encoding="utf-8" />
<xsl:param name="html-content-type" />
<xsl:template match="/Template">
<div id="LeftContent">
<xsl:for-each select="loop[@name='Products']/item">
<div style="display: block;">
<xsl:attribute name="id">
<xsl:text></xsl:text>myContent<xsl:value-of select="Ecom.Product.LoopCounter" disable-output-escaping="yes"/>
</xsl:attribute>
<img >
<xsl:attribute name="src">
<xsl:value-of select="Ecom.Product.ImageLarge.Clean" disable-output-escaping="yes"/>
</xsl:attribute>
<xsl:attribute name="alt">
<xsl:value-of select="Ecom.Product.Name" disable-output-escaping="yes"/>
</xsl:attribute>
</img>
<br class="clear" />
<xsl:if test="Ecom.Product.Field.RemovableFootbedStamp.Value = 'True'">
<img >
<xsl:attribute name="src">/Files/System/Images/RemovableFootbed.gif</xsl:attribute>
<xsl:attribute name="class">RemovableStamp</xsl:attribute>
</img>
<br class="clear" />
</xsl:if>
<h2>
<xsl:value-of select="Ecom.Product.Name" disable-output-escaping="yes"/>
</h2>
<xsl:value-of select="Ecom.Product.LongDescription" disable-output-escaping="yes"/>
</div>
</xsl:for-each>
</div>
<div id="RightContent">
<xsl:for-each select="loop[@name='Products']/item">
<img >
<xsl:attribute name="src">
<xsl:value-of select="Ecom.Product.ImageSmall.Clean" disable-output-escaping="yes"/>
</xsl:attribute>
<xsl:attribute name="alt">
<xsl:value-of select="Ecom.Product.Name" disable-output-escaping="yes"/>
</xsl:attribute>
</img>
<h3>
<xsl:value-of select="Ecom.Product.Name" disable-output-escaping="yes"/>
</h3>
<hr />
</xsl:for-each>
</div>
</xsl:template>
</xsl:stylesheet>