简体   繁体   中英

Shopify / Liquid - Searching for all products of a certain variant in collection

I want to add a filter feature to my collections.

I have a side-menu, with buttons for Small, Medium and Large, and I would like to see all the products in the collection that are available (in stock) when the user clicks to filter by that specific size.

I would also like to be able to do this for other variations (eg colours) and possibly also tags.

How would I go about doing this? Thank you.

The products in collections can be filtered using tags, which is standard Shopify functionality. Here's a tutorial on how to do that with buttons: Filter collections with product tags .
You would need to assign size and colour tags to the product if you want to able to filter by these parameters.

If standard functionality doesn't fit there are apps in the Shopify app store that should suit you, some of them are pretty powerful.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM