How to resolve inconsistent abandoned cart email messages?

Hey,

I need your help. I have tried with 2 different email addresses to test my abandoned cart flow.

It is working but I do not have the message for both of my emails…

Basically, I have added one line/sentence with a promo code and for one email it does show and the other nothing.

See below:

The only thing I could see is that for one email address I have added 1 product and for the other one 2 products.

Could it be the issue and how to fix that?

Thanks,

C

Here the code.

Thanks.

Show More

{% capture email_title %}
{% if item_count == 1 %}
Je hebt een artikel in je winkelwagen gelaten
{% else %}
Je hebt nog artikelen in je winkelwagen
{% endif %}
{% endcapture %}
{% capture email_body %}
{% if billing_address.first_name %}
{% if item_count == 1 %}
Hallo {{ billing_address.first_name }}, Je hebt een artikel aan je winkelwagen toegevoegd en je aankoop niet voltooid. Je kunt deze nu voltooien terwijl het nog beschikbaar is.
{% else %}
Beste {{ billing_address.first_name }}, je hebt artikelen aan je winkelwagen toegevoegd maar je hebt je aankoop nog niet afgerond. Je kunt deze nu voltooien terwijl ze nog beschikbaar zijn.

Omdat we vinden dat iedereen de beste producten verdient, geven we je 10% KORTING op de reeds afgeprijsde prijs! Gebruik code: VIP10
{% endif %}
{% else %}
{% if item_count == 1 %}
Hallo, je hebt een artikel aan je winkelwagen toegevoegd en je aankoop niet voltooid. Je kunt deze nu voltooien terwijl het nog beschikbaar is.
{% else %}
Hallo, je hebt artikelen aan je winkelwagen toegevoegd en je aankoop niet voltooid. Je kunt deze nu voltooien terwijl ze nog beschikbaar zijn.

Omdat we vinden dat iedereen de beste producten verdient, geven we je 10% KORTING op de reeds afgeprijsde prijs! Gebruik code: VIP10
{% endif %}
{% endif %}
{% endcapture %}

{%- if shop.email_logo_url %}

{%- else %}

{{ shop.name }}

{%- endif %}

{{ email_title }}

{% if custom_message != blank %}

{{ custom_message }}

{% else %}

{{ email_body }}

{% endif %}

Artikelen in je winkelwagen

{% if shop.url %}

of Bezoek onze winkel

{% endif %}

Je aankoop voltooien

{% for line in subtotal_line_items %}
{% endfor %}

{% if line.image %}

{% endif %}

{% if line.product.title %}
{% assign line_title = line.product.title %}
{% else %}
{% assign line_title = line.title %}
{% endif %}

{% if line.quantity < line.quantity %}
{% capture line_display %} {{ line.quantity }} of {{ line.quantity }} {% endcapture %}
{% else %}
{% assign line_display = line.quantity %}
{% endif %}

{{ line_title }} × {{ line_display }}

{% if line.variant.title != ‘Default Title’ %}
{{ line.variant.title }}

{% endif %}

{% if line.selling_plan_allocation %}
{{ line.selling_plan_allocation.selling_plan.name }}

{% endif %}

{% if line.refunded_quantity > 0 %}
Terugbetaald
{% endif %}

{% if line.discount_allocations %}
{% for discount_allocation in line.discount_allocations %}
{% if discount_allocation.discount_application.target_selection != ‘all’ %}

{{ discount_allocation.discount_application.title | upcase }}
(-{{ discount_allocation.amount | money }})

{% endif %}
{% endfor %}
{% endif %}

Wil je geen herinneringen over je winkelwagen ontvangen? Afmelden

I would also like to know how to solve this problem!