Auto Abandoned Cart Notification Email not displaying properly

Topic summary

Main issue: An abandoned cart email (automated reminder to complete a purchase) applies a 10% discount, but the copy meant to appear under the title and above the “return to cart” button does not display.

Key details from the code (Shopify Liquid, a templating language):

  • email_title and email_body are captured into variables, but only email_title is used in the HTML ; email_body is never inserted into the email’s content area.
  • email_body is wrapped in an if statement that only sets content when billing_address.first_name exists; if absent, email_body becomes empty.

Additional observations that may affect rendering:

  • Markup appears truncated/incomplete (e.g., stray “container”>, incomplete footer tags).
  • Unusual/link syntax for shop.name in alt and anchor attributes, and a nonsensical quantity comparison (line.quantity < line.quantity) suggest template errors.

Outcome/status:

  • No resolution or confirmed fix yet; the thread remains open.

Open questions/action items:

  • Insert and position {{ email_body }} in the HTML where the copy should appear.
  • Confirm the if-condition logic and ensure the copy displays when first_name is missing.
  • Clean up malformed HTML/variables to prevent layout issues.

Note: The provided code snippet is central to understanding the issue.

Summarized with AI on February 21. AI used: gpt-5.

Hi

I am trying to set up an abandoned cart auto notification with a 10% discount applied at cart. The discount is working but part of the copy is being left out - the copy the sits under the title and above the button to return to cart.

Here is the full code I have:

{% capture email_title %}
The Plant Gliders you added to your cart are waiting for you.
{% endcapture %}
{% capture email_body %}
{% if billing_address.first_name %}
Hi {{ billing_address.first_name }}, you have great taste!

Omnia Plant Gliders outperform other plant movers in style, manoeuvrability and durability.

So good, Plant Glider even won a 2021 Australian Good Design Award.

With 95% of customers giving Plant Glider a 5 Star Rating, what are you waiting for? You're going to love them too!

To sweeten the deal, we'll even discount your first order by 10% - simply tap below to return to your cart with 10% off.

{% endif %}
{% endcapture %}

{{ email_title }} .button__cell { background: {{ shop.email_accent_color }}; } a, a:hover, a:active, a:visited { color: {{ shop.email_accent_color }}; }
{%- if shop.email_logo_url %} {{ [shop.name](http://shop.name/) }} {%- else %}

{{ [shop.name](http://shop.name/) }}

{%- endif %}

{{ email_title }}

{% if custom_message != blank %}

{{ custom_message }}

{% else %}

{{ email_body }}

{% endif %}
 
Items in your cart
{% if shop.url %}
or Visit our store
{% endif %}

Complete your purchase

{% 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 %}
Refunded
{% 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 %}

Don't want to receive cart reminders from us? Unsubscribe

This displays exactly as I want it to when I do a test email from the editing feature in Notifications:

But when the system actually sends a real email out to an abandoned cart customer all of the copy that should appear between the title and the button disappears.

Is anyone able to look at the code for me and debug so this doesn’t happen?

Thank you so much!

Kristen