Dedicated to the Hydrogen framework, headless commerce, and building custom storefronts using the Storefront API.
Hi everyone.
I'm struggling with products filtering of storefront API.
The problem I facing is cannot fetch filter of metafield with type = list.single_line_text_field.
I've found there are limitation about metafield filter in document below.
https://shopify.dev/custom-storefronts/products-collections/filter-products
Product and variant metafield filters are available for metafields defined using the metafield types single_line_text_field ,boolean, numeric_integer, numeric_decimal using API version2022-04or higher.
I would think it is also able to filter by metafield defined as list.single_line_text_field in custom storefront because I can filter products by metafield defined as list.single_line_text_field in Shopify Theme
Is it able to use metafield types list.single_line_text_field via storefront API?
if it is enabled is there any other cause not for fetching metafield filter types list.string_line_text_field?
Regards.
Hi @tomotomy👋
I'd recommend checking to see if the metafield has storefront visibility.
Hope that helps!
Developer Support @ Shopify
- Was this reply helpful? Click Like to let us know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog
I've checked query you mentioned and found the visibility record of the metafield returned, also product query returned the metafield value....😥
However, the metafield filter not found in products and collection query.
I've also set up a metafield filter with the Search & Discovery app.
Thanks @ShopifyDevSup