When the campaign item is configured in the way you describe uCommerce will produce XML for the product family only. Individual variant SKUs will be included only when there you target them specifically.
This is what the XML looks like when targeting specific variant SKUs:
Product discount
I have configured a discount for a specific product like this:
http://i.imgur.com/L0BwE.png
My campaign is not expired.
Here is the XSLT I use:
<xsl:variable name="campaignItems" select="CommerceLibrary:GetTargetedCampaignItems()"/>
<xsl:variable name="currentSku" select="$product/@sku"/>
<xsl:choose>
<xsl:when test="$campaignItems/campaignItems/campaignItem/product[@sku = $currentSku and @variantSku = '']">
<xsl:variable name="amountOff" select="$campaignItems/campaignItems/campaignItem/product[@sku = $currentSku and @variantSku = '']/@amountOff"/>
<xsl:value-of select="./@currency"/> <xsl:value-of select="CommerceLibrary:FormatCurrency(./@price - $amountOff)"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="./@currency"/> <xsl:value-of select="CommerceLibrary:FormatCurrency(./@price)"/>
</xsl:otherwise>
</xsl:choose>
Hi Martin,
When the campaign item is configured in the way you describe uCommerce will produce XML for the product family only. Individual variant SKUs will be included only when there you target them specifically.
This is what the XML looks like when targeting specific variant SKUs:
and for product families:
is working on a reply...