Hello!
I want to show only products to cutstomers if products and customers have the same tag. My theme is Dawn. How can I do that?
Hello!
I want to show only products to cutstomers if products and customers have the same tag. My theme is Dawn. How can I do that?
Create a new template file: In the “Templates” directory, create a new file called collection.customer-tag.liquid. This file will be used to display products that have tags matching the customer’s tag.
Edit the new template file: Open the collection.customer-tag.liquid file and add the following code:
{% layout none %}
{% paginate collection.products by 12 %}
{% endpaginate %}
Hi @Shoppy_1234
That is doable but you might have to ask the customer to sign in whenever they are viewing the collection. You use the code below as reference
{% if customer %}
{% if customer.tags contains 'show_customer' %}
Show the product...
{% else %}
Other stuff here
{% endif %}
{% else %}
Log in to view products...
{% endif %}
Thanks. It helped me to find a solution!