A user wants to display “You are already subscribed” when someone tries to sign up for a newsletter with an email already in the list, instead of the default “Thanks for subscribing” message.
Use JavaScript to check email status before form submission
Send AJAX request to verify if email exists in customer list
Display appropriate message and prevent duplicate submissions
Liquid Customer Tags Approach:
Only works if newsletter subscribers are stored as Shopify customers with specific tags (e.g., “newsletter”)
Loop through customers to check if email matches
Limitation: Won’t work with third-party email marketing apps like Klaviyo or Mailchimp
Status: The discussion remains open with one detailed response providing implementation guidance. The JavaScript method is suggested as the most practical quick fix for general use cases.
Summarized with AI on November 1.
AI used: claude-sonnet-4-5-20250929.
I see what you’re trying to do—you want to check if an email is already in your newsletter list and display a different message accordingly. You’re on the right track thinking about Liquid, but since Shopify’s forms don’t automatically validate duplicate emails, you’ll need some custom handling.
How to Show “Already Subscribed” Message for Newsletter Signups
Since Shopify’s native Liquid can’t directly check if an email is already in the list, you’ll need a workaround. Here’s how you can do it:
1. Use JavaScript to Check Email Status
Liquid alone won’t handle this completely, so you’ll need JavaScript to verify if the email exists before form submission.
Example Approach:
When the user enters an email, send an AJAX request to check if it’s already in your customer list (if you store subscribers as customers).
If found, prevent form submission and show “You are already subscribed.”
If not found, proceed with normal form submission.
2. Alternative: Use Shopify Customer Tags (If Customers = Subscribers)
If you store newsletter subscribers as customers with a tag (e.g., newsletter), you can check within Liquid:
{% assign subscriber = false %}
{% for customer in shop.customers %}
{% if customer.email == form.email %}
{% assign subscriber = true %}
{% endif %}
{% endfor %}
{% if subscriber %}
You are already subscribed.
{% else %}
Thanks for subscribing!
{% endif %}
Limitations:
This works only if you use Shopify’s customer system to track subscribers.
It won’t work if you use third-party email marketing apps like Klaviyo or Mailchimp.
Best Approach?
If you just need a quick fix, the JavaScript method is the way to go. If your newsletter list is tied to Shopify customers, you can try the customer tag approach.
Hope that helps! Let me know if you need further clarification.
If you need any other assistance, I am willing to help.
Best regards,
Daisy.