Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

In de E-mail trigger zijn twee opties:

...

(warning) Let op: gebruik één van de twee opties!

1. Het versturen van een trigger

...

Expand
titleHoe kan ik de RSS-feed toevoegen aan een template?

Een productset op basis van een RSS-feed kun je als volgt toevoegen:

  • Open Copernica Publisher

  • Navigeer naar ‘Stijl’ en klik op ‘Nieuwe XSLT’

  • Wijzig de XSLT instellingen naar onderstaand en klik op ‘Opslaan’

  • Plak de onderstaande code in de XSLT (voor in dit geval het tonen van drie producten) en klik op ‘Opslaan’

Code Block
  <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>
  • Navigeer naar ‘E-mailings' en klik op ‘Template’

  • Maak een nieuw template aan met de volgende instellingen:

    • Naam: de naam van het template

    • Description: een eventuele beschrijving van het template

    • Opties: template voorzien van voorbeeldcode

    • Taal: de gewenste taal van het template

  • Ga naar HTML broncode

  • Pas de inhoud van de onderstaande code aan met:

    • {accountid}: het Squeezely account id (ga naar Settings in Squeezely en zie Account ID)

    • {productsetid}: het id van de productset die je wilt gebruiken (ga naar Product Sets in Squeezely en zie ID)

    • {emailaddress}: de parameter van het e-mailadres in Copernica (in het geval van een gepersonaliseerde productset)

    • {productlimit}: het maximale aantal producten dat getoond wordt

    • {XSLTName}: de naam van de gemaakte XSLT

(lightbulb) Bekijk de RSS-feed van de productset.

Code Block
{capture assign=feedurl}https://www.squeezely.tech/products?account={accountid}&productset={productsetid}&email={emailaddress}&limit={productlimit}{/capture}
{loadfeed feed={$feedurl} xslt="{XSLTName}" personalizable="true"}
  • Voeg de code aan een element toe:

  • Klik op ‘Opslaan’

  • Ga naar een document gebaseerd op dit template en bekijk het resultaat:

...