I followed the tutorial in this video https://youtu.be/id-U46Lljz0?si=KF-PZ_uG3N8JtG99 couple of months ago. I have just come back to find that my code no longer works.
I am using the dawn theme, and put this if statement in main-cart-items.liquid:
<form action="{{ routes.cart_url }}" class="cart__contents critical-hidden" method="post" id="cart">
{% if customer.tags contains 'registered' %}
<input type="hidden" id="discount" name="discount" value="registered">
{% endif %}
<div class="cart__items" id="main-cart-items" data-id="{{ section.id }}">
<div class="js-contents">
...
This didn’t work, even when I took it out of the if statement. No discount.
Have I got it in the wrong place? Any help would be appreciated.
This is my store, sorry I can only give a preview link right now, but I will try to update it every two days: https://youtu.be/id-U46Lljz0?si=KF-PZ_uG3N8JtG99
Edit: I should mention that I am using the GoodApps Free Gifts plugin, I don’t know if that will affect anything.
Thanks.
1 Like
If you can share your store URL I can assist you better.
Sorry, I pasted the wrong link.
The store URL is here: https://www.goorganicshopping.com.au/
Any help would be greatly appreciated.
Hello @Natural1
I created one account in your store using this email ID: prakash.prabhakar@yopmail.com
But I think you may need to add the tag.
Please note that the code above will only work if the customer is logged in, has the required tag, and checks out using the form where you added the code.
Hi @prakashVt
I have given you the registered tag.
I was looking for another way to achieve the same result. because it wasn’t really working before. It seems to be okay now, but if you know of any other ways I would be grateful if you could share them.
Hi Natural1,
Instead of having to maintain your own code, especially if you are not a developer, I recommend trying our app, Regios Automatic Discounts.
It’s easy to set up an automatic discount for customers with a specific tag. For example, I have attached a screenshot of how to set up a 10% off discount for customers with the “registered” tag:
No coding involved at all, and no manual maintenance required.
If you have any questions, just reply, and I’ll be happy to answer.
Best,
Tobe
Hi Natural1,
You’re running into a common issue here… theme-based tag/discount logic often breaks when Shopify updates themes (like Dawn) or when other apps modify the cart.
Instead of relying on theme code, one more stable approach is to automate the tagging itself at the data level:
For example, with a rule-based tagging app like AutoTag Pro, you can:
-
Automatically add the registered tag to customers when they meet your condition (account created, order placed, email domain, etc.)
-
Keep that tag in sync over time (add/remove automatically)
-
Then use Shopify’s built-in automatic discounts or apps like Regios to apply discounts based on that tag - no theme code required.
This avoids cart template changes entirely and works regardless of theme updates or other apps.
If you’d like, I can outline what rule you’d need for your specific setup.