How to skip bundle products created by different apps when fetching product using resource picker.

How to skip bundle products created by different apps when fetching product using resource picker.

Wakil_eFoli
Shopify Partner
47 2 6

I'm using resource picker to fetch products but they show all the bundles along with the products. So I've filtered some bundles using some knows tags from some apps.

 

But this is not a viable solution as different app uses different tags and some don't use one so I was wondering how can I show only products list when fetching products using Shopify resource picker. 

 

 

 

Reply 1 (1)

kevan-shopify
Shopify Staff
2 0 0

 

The resource picker accepts a `query` param (and also `filter.query`, the difference between being that the filter query is not shown in the search field, whereas `query` is)

 

both use the search syntax... I'm not seeing docs for this, but you can filter out all bundles (both static and dynamic) via `has_variant_with_components:false` (similarly, you probably want to filter out combined listings 😄 via `

-combined_listing_role:PARENT`)
 
 
await shopify.resourcePicker({
  type: 'product',
  action: 'select',
  filter: {
    query: 'has_variant_with_components:false AND -combined_listing_role:PARENT',
    variants: false,
    hidden: false,
    draft: false,
    archived: false,
  },
});