Liquid, JavaScript, themes, sales channels
Hello Guys
Can you advise how can I add a newline in the email body such that following lines appear as depicted below (just 1 example posted here)
CURRENT:
Hi, you added an item to your shopping cart and haven't completed your purchase. If you have any questions, please feel free to drop a note at XXX@XXX.COM.
DESIRED:
Hi, you added an item to your shopping cart and haven't completed your purchase.
If you have any questions, please feel free to drop a note at XXX@XXX.COM.
{% 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. If you have any questions, please feel free to drop a note at XXX@XXX.COM.
{% else %}
Hi {{ billing_address.first_name }}, you added items to your shopping cart and haven't completed your purchase. If you have any questions, please feel free to drop a note at XXX@XXX.COM.
{% endif %}
{% else %}
{% if item_count == 1 %}
Hi, you added an item to your shopping cart and haven't completed your purchase. If you have any questions, please feel free to drop a note at XXX@XXX.COM.
{% else %}
Hi, you added items to your shopping cart and haven't completed your purchase. If you have any questions, please feel free to drop a note at XXX@XXX.COM.
{% endif %}
{% endif %}
{% endcapture %}
Solved! Go to the solution
This is an accepted solution.
Works perfectly fine for my templates. What is the email client you are using to view the message? Rendering might differ from client to client.
Tested in Chrome/Gmail and MacOSX Mail.
Use a <br> tag to move the second sentence to a new line. Just add it after the "purchase.". Unfortunately, can't provide you with a complete example, as the forum engine is interpreting my <br> tags 🙂
This is an accepted solution.
Works perfectly fine for my templates. What is the email client you are using to view the message? Rendering might differ from client to client.
Tested in Chrome/Gmail and MacOSX Mail.
This is so frustrating, I have given a space before and after and still no joy. I had assumed this was quite a simple thing to do...
Can anyone spot anything I'm doing wrong here?
Hi {{ billing_address.first_name }}, <br> <br> you added an item to your shopping cart and for whatever reason haven't completed your purchase. You can complete it now while it's still available.
Output below.
Worked for me thanks a lot!
User | RANK |
---|---|
25 | |
22 | |
9 | |
6 | |
6 |
Explore the 30-30-30 rule, a dynamic social media strategy for new businesses. Learn how t...
By Trevor Sep 20, 2023Discover how to leverage the often overlooked footer of your ecommerce site to gain custom...
By Skye Sep 15, 2023In this blog, we’ll be shining a light on Shopify Partners, Experts, and Affiliates. Who a...
By Imogen Sep 13, 2023