Inserting Multiple Products Into An Email Template
Last updated
Last updated
Swish sends events when a users interacts with their Wishlist, including when a users adds to, removes from or views their Wishlist.
These behavioural events can be used to trigger emails that feature multiple products from a customers Wishlist such as Wishlist Welcome and Reminder flows.
The method explained below needs to utilise our LatestWishlistItems
event, which can contain up to 10 of the most recent wishlisted products in a customer's Wishlist.
The simplest way to insert product information from a Wishlist event is by using a Table content block in your email templates.
To add a Table content block and integrate the catalog lookup tags for displaying your products and content, follow these steps:
Under Blocks select and drag a Table onto your template where you would like your product image and details to appear.
Tables utilise Static data within the Styles setting by default. For emails that feature multiple products from an event, the data should be set to Dynamic.
The following code should be added to the Row collection field.
Note: the slice
value determines the amount of products that will be shown in the email. (10 max.)
The Row Alias should be set to "item
".
Determine which side of your Table content block will contain the product information and which side will feature the product image (We recommend image left and text right):
Select the left-hand side of the table and click Image, and then click Select Image:
Select Dynamic Image and enter this code into the field for the image URL:
Next, press Save.
Now, enter this code into the Link address field.
Now, to insert product details we use the text column the box on the right-hand side of the Cell selector and then select Text under Column content.
Here you can utilise the relevant catalog lookup tags from the table above. In this example we are going to include the Product title, variant title and current price using the following code:
NOTE: This code must be pasted into the Source code within the text editor:
Once you have the Source Code editor open, paste the below code
You can now preview and send a test email to ensure that everything is setup and working as expected!