Output the currency symbol in uCommerce
One thing that's always bugged me about uCommerce is the way the prices are displayed (using the not so inviting ISO codes), this is a simple switch statement to output the (prettier) HTML symbol instead.
<xsl:choose> <xsl:when test="@currency = 'GBP'"> <xsl:text disable-output-escaping="yes">&pound;</xsl:text> </xsl:when> <xsl:when test="@currency = 'EUR'"> <xsl:text disable-output-escaping="yes">&euro;</xsl:text> </xsl:when> <xsl:when test="@currency = 'YEN'"> <xsl:text disable-output-escaping="yes">&yen;</xsl:text> </xsl:when> <xsl:otherwise> <xsl:text disable-output-escaping="yes">$</xsl:text> </xsl:otherwise> </xsl:choose>
Liked this post? Got a suggestion? Leave a comment