When you apply a discount to your checkout exit emails, your customers will receive a pre-filled cart at a discounted price via email. Customers only need to enter their payment information to complete their purchase.
Note! shopify.com
If the customer manually entered another discount code at the beginning of the purchase before canceling it, the original discount code will be replaced with the renewal discount code.
On This Page
Considerations
Step 1: Set up a discount code
Step 2: Change the cancellation message for the purchase
Considerations
Before you begin, please note the following:
The message telling the customer that they have received a discount is not automatically replaced by the added code. Add the message to a template if you want to include a discount code message in an abandoned purchase recovery message.
Avoid using special characters in discount names so that the discount names are correctly added to your store's checkout URL.
Step 1: Create a discount code
Step:
Create a percentage or fixed discount code depending on the type of promotion you want to offer.
Don't forget to write down the name you gave the discount code when it was created, for example Welcome back. Give your discount code a name when you create the discount.
Make sure your abandoned cart recovery emails are set in your checkout page settings.
Step 2: Edit the abandoned purchase recovery message.
Note
Make sure to add a message to the customer in the body of the abandoned cart recovery model. This way your customers will know that you are giving them a discount.
From your Shopify admin, go to Settings -> Notifications.
In the Settings section, click Payment canceled.
In the body of the email (HTML) find the line with this code:
<td class="button cell"><a href="{{ url }}" class="button text">Items in your cart < / a > </td>
Copy the following snippet:
{% if url contains '?' %}{{ URL | add: 'discount=ABC' }}{% other %}{{ url | append: '?discount=ABC' }}{% endif %}
Paste the snippet to replace {{ url }}.
Locate the line with this code:
<td class="link cell">or <a href="{{ shop.url }}">Visit our shop</a></td>
Copy the following code- Snippet:
{ { shop .url | append: '/discount/ABC' }}
Paste the snippet to replace {{ shop.url }}.
Replace each copy of ABC with your discount code, for example Welcome Back. Your code should look like this:
<tr>
<td class="actions__cell">
<table class="button main-action-cell">
<tr>
<td class="button cell"><a href="{ % if URL contains "?" %}{{ url | append: 'discount=Welcome back' }}{% else %}{{ url | append: '?discount=Welcome back' }}{% end of %}" class = "button text"> Products in your shopping cart </a></td>
</tr>
</table>
{% if shop.url %}
<table class="link primary-action-cell">
<tr>
< td class="link cell">or < a href="{{ shop.url | append: '/discount/Welcome Back' }}">Visit our shop</a></td>
</tr>
< / table>
{% endif % }
</td>
</tr>
Click Save.
Now all returned recovery messages will have URLs ending with discount=Welcome Back or /discount/Welcome Back and this discount will be applied automatically when the purchase is complete. Be sure to set the discount code so that it is applied correctly.