Skip to content

Instantly share code, notes, and snippets.

@shopifypartners
Last active August 8, 2021 01:19
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save shopifypartners/4f2f8a5f05d906ccfcc64b716240d984 to your computer and use it in GitHub Desktop.
Save shopifypartners/4f2f8a5f05d906ccfcc64b716240d984 to your computer and use it in GitHub Desktop.
Snippet of abandoned checkout email notification to load a discount - https://www.shopify.com/partners/blog/shopify-email-notifications
<td class="button__cell">
<a href="{% if url contains '?' %}
{{ url | append: '&discount=WelcomeBack' }}
{% else %}
{{ url | append: '?&discount=WelcomeBack' }}
{% endif %}" class="button__text">Complete your purchase</a></td>
</tr>
</table>
{% if shop.url %}
<table class="link secondary-action-cell">
<tr>
<td class="link__cell"><a href="{% if url contains '?' %}
{{ url | append: '&discount=WelcomeBack' }}
{% else %}
{{ url | append: '?&discount=WelcomeBack' }}
{ % endif %}" class="link__text"><span class='or'>or</span> Visit our store</a>
</td>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment