I’m trying to create 2 drop-down lists to filter one collection of products
I looked all over the internet and I couldn’t find a tutorial for that.
I know what I need to do but I don’t know how. So if you can, please, answer any of the following questions so I can move on with my code:
- How can I create a drop-down list of all tags built in this structure: “PRODUCT_Socks”
- How can I get the value selected in a drop-down list () and use it afterwards?
- How can I hide the beginning of the tag? – hide the “PRODUCT_” so customers will only see “Socks”.
Thanks! 🙂
2
Answers
Check out this link, Hope this will be helpful
https://help.shopify.com/themes/customization/collections/filter-collections-with-product-tags
https://help.shopify.com/themes/customization/collections/filtering-a-collection-with-multiple-tag-drop-down
basically whatever is being used to output the tags …i.e.{{ product.tags | remove: ‘PRODUCT_’}} that should get you the tag you want