Displaying select products based off customer tags in a collection

HunterKR
New Member
6 0 0
Hey there everyone! 
 
I am working on store as a project, I want to be able to change what a customer see in a specific collection based off their tag. There will be multiple tags and mulitple products assigned to those tags.
 
Im pretty new to Liquid and a beginner at Javascript. Any tips would be amazing! 
 
Thanks,
 
Hunter 
Replies 3 (3)

LitExtension
Shopify Partner
4860 1001 1128

Hi @HunterKR

You can try to use this snippet:

{% for tag in product.tags %}

  {% if tag contains 'your_customer_tab' %}

    {% render 'product-item %}

  {% endif %}

{% endfor %}

Remember: You need to change "your_tab" with the tag of the customer.

Hope this helps. If you can not do that, you can add me as a staff, I'll check it for you.

LitExtension - Shopping Cart Migration Expert
Check out our Shopify migration app to migrate your online store to Shopify
HunterKR
New Member
6 0 0

So i tried it with the correct customer tags an items were rendered. I have this code in a page template, should I insert it into a collection template instead?

Thanks,

Hunter

LitExtension
Shopify Partner
4860 1001 1128

Hi @HunterKR

Yes, you can do that 

LitExtension - Shopping Cart Migration Expert
Check out our Shopify migration app to migrate your online store to Shopify