Join the Webstudio community

Updated 2 months ago

Filtering Shopify Collection Metafields to Display Only True Values

At a glance

A community member has pulled in a set of collections from their Shopify store using the Storefront API, and they have a metafield data that is either true or false. They want to display only the collections where the metafield is set to true. The community members discuss ways to achieve this, such as trying it on the collection item and fetching data for a variable on a button click. However, there is no explicitly marked answer in the comments.

Hey there I have pulled in a set of collections from my shopify store using the storefront api's. In the result I have a metafield data that is either true or false. I only want to display the ones that are set to true in my collection. How can I achieve this?
B
a
6 comments
Try this on collection item
Attachment
image.png
ahh yes of course. thank you.

Also do you know if there is a way to fetch data for a variable on a button click?
Only if you submit something with form
Then all resources will be reloaded
awesome thanks. Hopefully I can fiure the rest out from there
sorry one more thing. Can you update a variable from from a click?
Add a reply
Sign up and join the conversation on Discord