How to exclude bundle products from abandoned cart emails
Excluding Bundles from Abandoned Cart Emails
When using Kitenzo, you may find that you want to prevent specific bundle products from appearing in your automated abandoned cart recovery emails.
Below are the steps to hide these products for both Klaviyo and Shopify’s native notification system.
Step 1: Tagging your products in Shopify
Before modifying your email templates, you need a way to tell your email provider which products to skip.
- Navigate to your Shopify Admin and open the Products section.
- Select the bundle product or service fee product you wish to exclude.
- In the Tags section, add a specific tag. For this example, we will use
exclude_ac. - Save your changes.
Step 2: Updating your email templates
If you use Klaviyo
Klaviyo uses dynamic table blocks to display items left in a cart. You can wrap the contents of these blocks in a conditional statement to check for your new tag.
For the text elements (Title, Price, etc.):
Wrap your existing code in an if statement like the one below:
{% raw %}
Code snippet
{% if not 'exclude_ac' in item.product.tags %}
<h3><a href="{{ organization.url }}products/{{ item.product.handle }}">{{ item.product.title }}</a></h3>
<p>Quantity: {{ item.quantity|floatformat:0 }} — Total: {% currency_format item.line_price|striptags|floatformat:2 %}</p>
{% endif %}
{% endraw %}
For the product image:
You will need to wrap the image source snippet in a similar check:
{% raw %}
Code snippet
{% if not 'exclude_ac' in item.product.tags %}{% if item.product.variant.images.0.src %}{{item.product.variant.images.0.src}}{%else%}{{item.product.images.0.src|missing_product_image}}{%endif%}{%endif%}
{% endraw %}
This logic ensures that if the tag exclude_ac is present, the item is skipped entirely in the email feed.
If you use Shopify Notifications
If you are using the standard Shopify abandoned checkout emails, you can edit the Liquid code directly in your Shopify settings.
- Go to Settings > Notifications in your Shopify admin.
- Locate the Abandoned Checkout template and click Edit code.
- Find the
{% for line in line_items %}loop. - Add a conditional
continuestatement at the very top of that loop:
{% raw %}
Code snippet
{% for line in line_items %}
{% if line.product.tags contains 'exclude_ac' %}
{% continue %}
{% endif %}
<!-- The rest of the existing product display code goes here -->
{{ line.product.title }}
{{ line.price | money }}
{% endfor %}
{% endraw %}
By using the continue command, Shopify will simply skip over any product containing that tag and move to the next item in the cart.