I have the Email Signup section enabled on my home page using the Impulse theme.
Is there a way to suppress the entire Email Signup section for existing customers, or, display a message “Already Subscribed” on submit, or something like that?
TIA, Mark
Hello @PuzzleTubes
Greetings from the Store Watchers Support Team! Happy to help you today.
Shopify will automatically add a ‘newsletter’ tag to the customers who submitted to the newsletter form.
You can just simply add an if-else statement. Please check the code below.
{% if customer.tags contains 'newsletter' %}
# Already Subscribed
{% else %}
//add the newsletter form code here
{% endif %}
I tested it on my end and works fine. Please check the below screenshot.
Let me know if need further assistance
Regards,
Store Watchers Support Team
Thanks! I’m new to liquid, where would the code go if this is the block?
{%- for block in section.blocks -%}
{%- case block.type -%}
{%- when '@app' -%}
{% render block %}
{%- when 'title' -%}
{%- if block.settings.title != blank -%}
{{ block.settings.title | escape }}
{%- endif -%}
{%- when 'text' -%}
{%- if block.settings.text != blank -%}
{{ block.settings.text }}
{%- endif -%}
{%- when 'form' -%}
{%- render 'newsletter-form', section_id: section.id, snippet_context: 'section' -%}
{%- when 'share_buttons' -%}
{%- render 'social-sharing' -%}
{%- endcase -%}
{%- endfor -%}