So I’m an email designer/developer I can perfectly code my own emails without the build-in drag & drop editor from Klaviyo.
However I still have a webshop where I want to use the data from Klaviyo and Shopify, specifically the feature where it can Repeat a block, similar to running through an array. I need it for an Order confirmation mail to loop through the products the user have chosen.
I can’t figure out the right snippet to wrap my code in to repeat my products.
This is my code i need wrapped:
<tr>
<td align="left" width="120">
<a href="#" target="_blank"><img src="{{ item.product.images.0.src }}" width="120" style="display: block; border: 0; width: 120px;"/></a>
</td>
<td align="left">
<table width="100%" cellspacing="0" celppadding="0" border="0" dir="ltr">
<tr>
<td align="left" dir="rtl" class="break">
<table width="100%" cellspacing="0" cellpadding="0" border="0" >
<tr>
<td align="left" class="break-product" style="font-size: 16px; font-family:'gt-america-medium', Arial, Helvetica, sans-serif; line-height: 24px; color: #505340;">
<a href="#" target="_blank" style="color:#505340; text-decoration: none;">{{ item.product.title }}</a>
</td>
</tr>
<tr>
<td height="20" style="font-size: 1px; line-height: 1px; height: 20px;"> </td>
</tr>
<tr>
<td align="left" style="font-size: 12px; font-family:'gt-pressura-regular', Arial, Helvetica, sans-serif; color: #505340;">
Size: 140ml
</td>
</tr>
</table>
</td>
<td align="left" width="190" dir="rtl" class="break">
<table width="100%" cellspacing="0" celppadding="0" border="0" valign="middle" dir="ltr">
<tr>
<td align="center" dir="ltr" class="break-product" style="border-top: 1px solid #505340; border-bottom: 1px solid #505340; padding: 10px 0px; font-size: 16px; font-family:'gt-pressura-regular', Arial, Helvetica, sans-serif; line-height: 24px; color: #505340;">
QTY {{ item.quantity }}
</td>
<td align="right" dir="ltr" class="break-product" style="font-size: 16px; font-family:'gt-america-medium', Arial, Helvetica, sans-serif; line-height: 24px; color: #505340; padding: 5px 25px 5px 0px;">
DKK {{ item.price }}
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
Is there a friendly soul out there who knows how to handle this?