Is there any way to fetch metafield filter with type = list.single_line_text_field via storefront?

Is there any way to fetch metafield filter with type = list.single_line_text_field via storefront?

nakano_thesense
Shopify Partner
30 7 9

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 ,booleannumeric_integernumeric_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.

 

 

株式会社thesenseはアパレルの輸入代行サービスやクーポン保有アプリなど様々なEC運営サービスの提供、自社ブランドの運営を行っている会社です。
わたしたちについて: https://biz.thesense.tokyo
Replies 2 (2)

ShopifyDevSup
Shopify Staff
1453 238 511

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

nakano_thesense
Shopify Partner
30 7 9

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 

株式会社thesenseはアパレルの輸入代行サービスやクーポン保有アプリなど様々なEC運営サービスの提供、自社ブランドの運営を行っている会社です。
わたしたちについて: https://biz.thesense.tokyo