ABANDONED CHECKOUT EMAIL PROBLEMS

Highlighted
New Member
11 0 0

Hello, I am already trying to configure out for a couple of days how to add a discount code to my abandoned emails, Ive done all the steps they told me to for setting up a discount code in my abandoned emails, Still anything is working, Could someone tell me please what I did wrong? Thank you!Screen Shot 2019-08-29 at 22.15.56.png

0 Likes
Highlighted
Shopify Partner
1825 211 381

What is the issue you are seeing? What specifically doesn't work? Is it the URL doesn't render correctly in the email? Or the discount is not working? Or the template wont save?

Sergiu Svinarciuc | CTO @ visely.io
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution!
- To learn more about the awesome stuff we do head over to visely.io or our blog
0 Likes
Highlighted
New Member
11 0 0

Hello, The discount doesn't show up in the abandoned checkout email.


@Visely-Team wrote:

What is the issue you are seeing? What specifically doesn't work? Is it the URL doesn't render correctly in the email? Or the discount is not working? Or the template wont save?


 

0 Likes
Highlighted
Shopify Partner
1825 211 381

Could you post the full content of your template instead of a screenshot?

Sergiu Svinarciuc | CTO @ visely.io
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution!
- To learn more about the awesome stuff we do head over to visely.io or our blog
0 Likes
Highlighted
New Member
11 0 0

{% capture email_title %}
{% if item_count == 1 %}
You left an item in your cart
{% else %}
You left items in your cart
{% endif %}
{% endcapture %}
{% capture email_body %}
{% if billing_address.first_name %}
{% if item_count == 1 %}
Hi {{ billing_address.first_name }}, you added an item to your shopping cart and haven't completed your purchase. You can complete it now while it's still available.
{% else %}
Hi {{ billing_address.first_name }}, you added items to your shopping cart and haven't completed your purchase. You can complete it now while they're still available.
{% endif %}
{% else %}
{% if item_count == 1 %}
Hi, you added an item to your shopping cart and haven't completed your purchase. You can complete it now while it's still available.
{% else %}
Hi, you added items to your shopping cart and haven't completed your purchase. You can complete it now while they're still available.
{% endif %}
{% endif %}
{% endcapture %}

<!DOCTYPE html>
<html lang="en">
<head>
<title>{{ email_title }}</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width">
<link rel="stylesheet" type="text/css" href="/assets/notifications/styles.css">
<style>
.button__cell { background: {{ shop.email_accent_color }}; }
a, a:hover, a:active, a:visited { color: {{ shop.email_accent_color }}; }
</style>
</head>

<body>
<table class="body">
<tr>
<td>
<table class="header row">
<tr>
<td class="header__cell">
<center>

<table class="container">
<tr>
<td>

<table class="row">
<tr>
<td class="shop-name__cell">
{%- if shop.email_logo_url %}
<img src="{{shop.email_logo_url}}" alt="{{ shop.name }}" width="{{ shop.email_logo_width }}">
{%- else %}
<h1 class="shop-name__text">
<a href="{{shop.url}}">{{ shop.name }}</a>
</h1>
{%- endif %}
</td>

</tr>
</table>

</td>
</tr>
</table>

</center>
</td>
</tr>
</table>

<table class="row content">
<tr>
<td class="content__cell">
<center>
<table class="container">
<tr>
<td>

<h2>{{ email_title }}</h2>
{% if custom_message != blank %}
<p>{{ custom_message }}</p>
{% else %}
<p>{{ email_body }}</p>
{% endif %}
<table class="row actions">
<tr>
<td class="actions__cell">
<table class="button main-action-cell">
<tr>
<td class="button__cell"><a href="{{ url }}" class="button__text">Items in your cart</a></td>
</tr>
</table>
{% if shop.url %}
<table class="link secondary-action-cell">
<tr>
<td class="link__cell">or <a href="{{ shop.url }}">Visit our store</a></td>
</tr>
</table>
{% endif %}

</td>
</tr>
</table>


</td>
</tr>
</table>
</center>
</td>
</tr>
</table>

<table class="row section">
<tr>
<td class="section__cell">
<center>
<table class="container">
<tr>
<td>
<h3>Complete your purchase</h3>
</td>
</tr>
</table>
<table class="container">
<tr>
<td>


<table class="row">
{% for line in subtotal_line_items %}
<tr class="order-list__item">
<td class="order-list__item__cell">
<table>
<td>
{% if line.image %}
<img src="{{ line | img_url: 'compact_cropped' }}" align="left" width="60" height="60" class="order-list__product-image"/>
{% endif %}
</td>
<td class="order-list__product-description-cell">
{% 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 %}

<span class="order-list__item-title">{{ line_title }} × {{ line_display }}</span><br/>

{% if line.variant.title != 'Default Title' %}
<span class="order-list__item-variant">{{ line.variant.title }}</span><br/>
{% endif %}

{% if line.refunded_quantity > 0 %}
<span class="order-list__item-refunded">Refunded</span>
{% endif %}

{% if line.discount_allocations %}
{% for discount_allocation in line.discount_allocations %}
{% if discount_allocation.discount_application.target_selection != 'all' %}
<span class="order-list__item-discount-allocation">
<img src="{{ 'notifications/discounttag.png' | shopify_asset_url }}" width="18" height="18" class="discount-tag-icon" />
<span>
{{ discount_allocation.discount_application.title | upcase }}
(-{{ discount_allocation.amount | money }})
</span>
</span>
{% endif %}
{% endfor %}
{% endif %}
</td>
</table>
</td>
</tr>{% endfor %}
</table>


</td>
</tr>
</table>
</center>
</td>
</tr>
</table>

<table class="row footer">
<tr>
<td class="footer__cell">
<center>
<table class="container">
<tr>
<td>
<p class="disclaimer__subtext">Don't want to receive cart reminders from us? <a href="{{ unsubscribe_url }}">Unsubscribe</a></p>
</td>
</tr>
</table>
</center>
</td>
</tr>
</table>
<img src="{{ 'notifications/spacer.png' | shopify_asset_url }}" class="spacer" height="1" />
</td>
</tr>
</table>
</body>
</html>


@Visely-Team wrote:

Could you post the full content of your template instead of a screenshot?


 

0 Likes
Highlighted
Shopify Partner
1825 211 381

The template content pasted by you is different from what can be seen on the screenshot, are you sure you've shared the correct template?

Sergiu Svinarciuc | CTO @ visely.io
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution!
- To learn more about the awesome stuff we do head over to visely.io or our blog
0 Likes
Highlighted
New Member
11 0 0

@Visely-Team wrote:

The template content pasted by you is different from what can be seen on the screenshot, are you sure you've shared the correct template?


This is the Abandoned checkout email template without the discount snippet code

Please help me where to put it so it would show up in the email

https://help.shopify.com/en/manual/promoting-marketing/discount-codes/discounts-for-abandoned-checko...

0 Likes
Highlighted
Shopify Partner
1825 211 381

I've followed the tutorial and had no issues.

 

You've missed a double-quote after href= When you replaced {{ url }} with the snippet from the tutorial, you ended up with:

          <td class="button__cell"><a href={% if url contains '?' %}{{ url | append: '&discount=ABC' }}{% else %}{{ url | append: '?&discount=ABC' }}{% endif %}" class="button__text">Items in your cart</a></td>

instead of:

          <td class="button__cell"><a href="{% if url contains '?' %}{{ url | append: '&discount=ABC' }}{% else %}{{ url | append: '?&discount=ABC' }}{% endif %}" class="button__text">Items in your cart</a></td>

Just add the "  after href= and before {% 

Sergiu Svinarciuc | CTO @ visely.io
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution!
- To learn more about the awesome stuff we do head over to visely.io or our blog
0 Likes
Highlighted
New Member
11 0 0

The discount still doesn't show up on the email, It looks like that.Screen Shot 2019-08-31 at 16.27.12.png

THIS IS MY CODE 

 

{% capture email_title %}
{% if item_count == 1 %}
You left an item in your cart
{% else %}
You left items in your cart
{% endif %}
{% endcapture %}
{% capture email_body %}
{% if billing_address.first_name %}
{% if item_count == 1 %}
Hi {{ billing_address.first_name }}, you added an item to your shopping cart and haven't completed your purchase. You can complete it now while it's still available.
{% else %}
Hi {{ billing_address.first_name }}, you added items to your shopping cart and haven't completed your purchase. You can complete it now while they're still available.
{% endif %}
{% else %}
{% if item_count == 1 %}
Hi, you added an item to your shopping cart and haven't completed your purchase. You can complete it now while it's still available.
{% else %}
Hi, you added items to your shopping cart and haven't completed your purchase. You can complete it now while they're still available.
{% endif %}
{% endif %}
{% endcapture %}

<!DOCTYPE html>
<html lang="en">
<head>
<title>{{ email_title }}</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width">
<link rel="stylesheet" type="text/css" href="/assets/notifications/styles.css">
<style>
.button__cell { background: {{ shop.email_accent_color }}; }
a, a:hover, a:active, a:visited { color: {{ shop.email_accent_color }}; }
</style>
</head>

<body>
<table class="body">
<tr>
<td>
<table class="header row">
<tr>
<td class="header__cell">
<center>

<table class="container">
<tr>
<td>

<table class="row">
<tr>
<td class="shop-name__cell">
{%- if shop.email_logo_url %}
<img src="{{shop.email_logo_url}}" alt="{{ shop.name }}" width="{{ shop.email_logo_width }}">
{%- else %}
<h1 class="shop-name__text">
<a href="{{shop.url}}">{{ shop.name }}</a>
</h1>
{%- endif %}
</td>

</tr>
</table>

</td>
</tr>
</table>

</center>
</td>
</tr>
</table>

<table class="row content">
<tr>
<td class="content__cell">
<center>
<table class="container">
<tr>
<td>

<h2>{{ email_title }}</h2>
{% if custom_message != blank %}
<p>{{ custom_message }}</p>
{% else %}
<p>{{ email_body }}</p>
{% endif %}
<table class="row actions">
<tr>
<td class="actions__cell">
<table class="button main-action-cell">
<tr>
<td class="button__cell"><a href="{% if url contains '?' %}{{ url | append: '&discount=HA3XUN10' }}{% else %}{{ url | append: '?&discount=HA3XUN10' }}{% endif %}" class="button__text">Items in your cart</a></td>
</tr>
</table>
{% if shop.url %}
<table class="link secondary-action-cell">
<tr>
<td class="link__cell">or <a href="{% if shop.url contains '?' %}{{ shop.url | append: '&discount=HA3XUN10' }}{% else %}{{ shop.url | append: '?&discount=HA3XUN10' }}{% endif %}">Visit our store</a></td>
</tr>
</table>
{% endif %}

</td>
</tr>
</table>


</td>
</tr>
</table>
</center>
</td>
</tr>
</table>

<table class="row section">
<tr>
<td class="section__cell">
<center>
<table class="container">
<tr>
<td>
<h3>Complete your purchase</h3>
</td>
</tr>
</table>
<table class="container">
<tr>
<td>


<table class="row">
{% for line in subtotal_line_items %}
<tr class="order-list__item">
<td class="order-list__item__cell">
<table>
<td>
{% if line.image %}
<img src="{{ line | img_url: 'compact_cropped' }}" align="left" width="60" height="60" class="order-list__product-image"/>
{% endif %}
</td>
<td class="order-list__product-description-cell">
{% 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 %}

<span class="order-list__item-title">{{ line_title }} × {{ line_display }}</span><br/>

{% if line.variant.title != 'Default Title' %}
<span class="order-list__item-variant">{{ line.variant.title }}</span><br/>
{% endif %}

{% if line.refunded_quantity > 0 %}
<span class="order-list__item-refunded">Refunded</span>
{% endif %}

{% if line.discount_allocations %}
{% for discount_allocation in line.discount_allocations %}
{% if discount_allocation.discount_application.target_selection != 'all' %}
<span class="order-list__item-discount-allocation">
<img src="{{ 'notifications/discounttag.png' | shopify_asset_url }}" width="18" height="18" class="discount-tag-icon" />
<span>
{{ discount_allocation.discount_application.title | upcase }}
(-{{ discount_allocation.amount | money }})
</span>
</span>
{% endif %}
{% endfor %}
{% endif %}
</td>
</table>
</td>
</tr>{% endfor %}
</table>


</td>
</tr>
</table>
</center>
</td>
</tr>
</table>

<table class="row footer">
<tr>
<td class="footer__cell">
<center>
<table class="container">
<tr>
<td>
<p class="disclaimer__subtext">Don't want to receive cart reminders from us? <a href="{{ unsubscribe_url }}">Unsubscribe</a></p>
</td>
</tr>
</table>
</center>
</td>
</tr>
</table>
<img src="{{ 'notifications/spacer.png' | shopify_asset_url }}" class="spacer" height="1" />
</td>
</tr>
</table>
</body>
</html>

0 Likes
Highlighted
Shopify Partner
1825 211 381

OK, I think I got it. If you are expecting to actually "see" the discount, you wont see it. It is coded to add the discount to the URL that would open when the recipient clicks on "Items in your cart" button or "Visit our store" link, try it and you'll see.

Sergiu Svinarciuc | CTO @ visely.io
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution!
- To learn more about the awesome stuff we do head over to visely.io or our blog
0 Likes