Shopify themes, liquid, logos, and UX
Hi Everyone,
In my order confirmation emails, I am trying to add a line of code to hide the default message if the customer has purchased a specific product and nothing else in the order.
So far if the customer purchases they receive the default message below:
Hey{% if billing_address.first_name.size <= 1 %},{% else %}
{{ billing_address.first_name }},
{% endif %}<br><br>Thanks for shopping. We’ll email you as soon as your order has shipped.
Next, if the item in question (referred to as test) is purchased the following code is used and displays a message underneath the default message for further instructions.
{% assign count = 0 %}
{% for line in subtotal_line_items %}
{% if line.product.tags contains "test" and count < 1 %}
{% assign count = count | plus: 1 %}
Great call getting a test product. We just wanted to let you know that it’s on the way over to your inbox. Thanks for shopping!
{% else count == 1 %}
{% break %}
{% endif %}
{% endfor %}
My goal is to hide the default message if the customer only purchases the 'test' product. Is this possible to achieve?
Thanks for your time 🙂
Thanks for post
which content do you have to hide this email template?
I would like to hide the following part of my email If the customer has purchased only the "test" product and no other items.
Hey{% if billing_address.first_name.size <= 1 %},{% else %}
{{ billing_address.first_name }},
{% endif %}<br><br>Thanks for shopping. We’ll email you as soon as your order has shipped.
Does that make sense?
Is what I would like to accomplish possible?
I am guessing you cannot hide content using liquid if the customer only purchases a specific item by itself?
can you please just comment if you have to hide any content like this
{% comment %}
if you have hide any content type here...
{% commentend %}
Hi @KetanKumar
Thanks for the response but that is not what I am trying to do.
I need to not display a message ONLY IF the customer has purchased a specific product by itself.
thanks for it
it can be done some customization please sent personal messaage
Portrait of Stephen positioned next to an image of planet Earth, with the Stephen's World ...
By JasonH Mar 18, 2024Digital marketers and app developers have tracked activity in apps and websites for yea...
By Ollie Mar 13, 2024February was an exciting month with Shopify Editions, informative webinars, and more! F...
By JasonH Mar 7, 2024