ResourcePicker - retrieve metafields from selected products

ResourcePicker - retrieve metafields from selected products

kkedzierski
Visitor
1 0 0

Hello everyone!

Description

I'm developing a Shopify App created with Shopify CLI (Node). In this app, I'm using Resource Picker to select products that later on will be added to Cart. However, my products have some metafields that I have to retrieve once I'm selecting them in the ResourcePicker component. The Shopify App will be used only on Shopify POS.

Question

Is it possible to somehow retrieve metafields from selected products using the ResourcePicker component or do I need to retrieve them by writing some additional function that will use GraphQL to get them?

 

 

Reply 1 (1)

Kris_Doyle
Shopify Partner
140 1 43

Hey @kkedzierski ,

 

Did you ever figure out a way to do this? I'm currently running into this myself, but with automated collections.

 

I can tell which rules have metafield definitions by the column name, but I can't get the definition ID, only the value, which isn't useful on its own when I don't know the key.

 

I suspect there isn't a way to do this, but thought I would bump this post 🙂