Iteration Tags

Iteration tags are used when you want to create a repeatable block of content dynamically. For example, if you want to list a series of products purchased or abandoned.       

1. "for"

This will list a series repeatedly. For example:


  {% for product in collection.products %}
    {{ product.title }}
  {% endfor %}


scarf purse necklace


Using Kevy's Default Template

Kevy provides a default template in the Kevy template library called "Cart Recovery Template" .



Cart Recovery: 

To create a dynamic cart recovery email, use the below:

FIRST NAME: {% if contact.first_name %} {{ contact.first_name }}{% endif %} 

  • {% if contact.first_name %} = If the contact has a first name associated to an email, then we will populate the first name here.
  • {{ contact.first_name }} = The contacts first name
  • {% endif %} = Ending the first name statement


To add the items the contact left in their cart, you will use the below:

Order items:  {% for line in cart_line_items %} {{ line.quantity }}x {{ line.title }}

{% endfor %}

  • {% for line in cart_line_items %} = this line is the most important because it gives the command to list ALL items left in the cart. 
  • {{ line.quantity }}x = This shows the quantity, so if the quantity was 1, this would show as '1x'
  • {{ line.title }} = This will show the title/name of the product(s) left behind.

Once sent, the customer will see this email as:


To customize your own Abandon Cart template, click here

Did this answer your question?