First, export the link for the RSS feeds in Spotler Activate via Products > Productsets. How can I process the RSS feed in an e-mail?
Then, go to the Copernica Publisher, navigate to 'Style' and click 'New XSLT'.
Change the XSLT settings to the following settings.
Paste the code below into the XSLT (for showing three products in this case).
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="items">
<xsl:call-template name="item" />
</xsl:template>
<xsl:template name="item">
<xsl:for-each select="item">
<table align="left" class="mcnTable" border="0" cellpadding="0" cellspacing="0" width="198" style="margin-top: 10px;">
<tr>
<td>
<table border="0" cellpadding="0" cellspacing="0" width="100%" style="">
<tbody>
<tr>
<td valign="top">
<table align="left" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td style="text-align: left">
<a href="{url}" target="_blank">
<img class="mcnImage" src="{image}" width="162" style="max-width: 200px; min-height: 162px; border: 0;height: auto;outline: none;vertical-align: bottom; margin: 0 0 10px 10px;" /></a>
</td>
</tr>
<tr>
<td style="color: #202020;font-family: Helvetica;font-size: 16px;line-height: 150%;text-align:left; vertical-align: top"
width="164" height="32" valign="top">
<div style="overflow: hidden; font-size: 14px; margin: 0 0 5px 10px;">
<a title="Shop Now" href="{url}" target="_blank" style="font-weight: 500;letter-spacing: normal;line-height: 100%;text-align: left;text-decoration: none; color: #333; font-size: 13px;">
<xsl:choose>
<xsl:when test="string-length(name) > '40'">
<xsl:value-of select="substring(name, 1, 40)" disable-output-escaping="yes" />...
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="name" disable-output-escaping="yes" />
</xsl:otherwise>
</xsl:choose>
</a>
</div>
</td>
</tr>
<tr>
<td style="font-family: Helvetica;font-size: 16px;line-height: 150%;text-align: left; font-weight: bold;" width="164" >
<a href="{url}" style="color: #555;text-decoration: none; margin: 0 0 0 10px;" target="_blank"><span style="text-decoration: none; font-size: 15px;">
<xsl:value-of select="currency_sign" disable-output-escaping="yes" /><xsl:value-of select="price" disable-output-escaping="yes" />
</span></a>
</td>
</tr>
<tr>
<td style="font-family: Helvetica;font-size: 16px;text-align: left;" width="164" height="53" valign="top">
<a href="{url}" style="color: #555;text-decoration: none; margin: 0 0 0 10px; font-size: 12px;" target="_blank">
<xsl:choose>
<xsl:when test="string-length(description) > '55'">
<xsl:value-of select="substring(description, 1, 60)" disable-output-escaping="yes" />...
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="description" disable-output-escaping="yes" />
</xsl:otherwise>
</xsl:choose>
</a>
</td>
</tr>
<tr>
<td class="btncontainer" style="font-family: Helvetica;font-size: 16px;line-height: 150%;text-align: center;"
width="164">
<table class="btncontainer" border="0" cellpadding="0" cellspacing="0" role="presentation" style="border-collapse:separate; line-height:100%; margin: 10px 0 0 10px" width="164">
<tbody>
<tr>
<td align="center" bgcolor="#2e74f5" role="presentation" valign="middle" style="border:none; border-radius:3px; padding: 10px; background:#2e74f5">
<a href="{url}" target="_blank" rel="noopener noreferrer" data-auth="NotApplicable" style="background:#2e74f5; color:#ffffff; font-family:Arial,sans-serif; font-size:15px; font-weight:normal; line-height:120%; margin:0; text-decoration:none; text-transform:none; ">
Shop now
</a>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</table>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
- Navigate to 'Mailings' and click on 'Template'. Create a new template with the following settings:
- Name: the name of the template
- Description: a possible description of the template
- Options: template with example code
- Language: the desired language of the template
- Go to HTML source code. Adjust the content of the code below with:
- {accountid}: the Spotler Activate account id (go to Settings in Spotler Activate and see Account ID)
- {productsetid}: the id of the product set you want to use (go to Product Sets in Spotler Activate and see ID)
- {emailaddress}: the parameter of the email address in Copernica (in case of a personalized product set)
- {productlimit}: the maximum number of products that will be shown
- {XSLTName}: the name of the XSLT created
View the RSS feed of the product set.
{capture assign=feedurl}https://www.squeezely.tech/products?account={accountid}&productset={productsetid}&email={emailaddress|escape:'url'}&limit={productlimit}{/capture} {loadfeed feed={$feedurl} xslt="{XSLTName}" personalizable="true"}
Add the code to an element:
Go to a document based on this template and view the result: