I have this to start. I want to take $20 off is someone purchases 2 of productVariantID 113 with the coupon code FBFLASHSALE.
This is working but also takes $20 off if they have only 1 in the cart or any other number. Which bit is wrong?
<xsl:transform version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<out>
<!--The quantity to qualify for promotion.-->
<xsl:variable name="qualifyQty" select="2" />
<xsl:variable name="productVariantID" select="113" />
<discountAmount>
<!-- Coupon code is always tested in lowercase -->
<xsl:if test="in/salesOrder/couponCodes[couponCode = 'fbflashsale']" >
<xsl:value-of select="-20.00" />
</xsl:if>
</discountAmount>
</out>
</xsl:template>
</xsl:transform>