Closed Jarvie789 closed 4 months ago
Hi Jarvie127,
Are you trying to show the product with all variants, or just the variants separately? If you intend to show the product with all variants, you can pass in the id
with the resourceType="Product"
.
Hey, dmhenry @dmhenry Thanks, I want to show only variants individually. I have read the documentation in great detail and searched for relevant content, but I still haven't found any documentation that is helpful to me.
@Jarvie127
I believe I was able to achieve your desired result. The id
s in initialQuery
are the individual variant ids.
<ResourcePicker
open
resourceType="ProductVariant"
selectMultiple
initialQuery="id:40255900844122 OR id:40255900876890 OR id:40255900909658"
/>
@dmhenry Hey, man. It still doesn't work. I tried to remove the single or double quotes but it didn't work.
<ResourcePicker
open
resourceType="ProductVariant"
selectMultiple
initialQuery="id:'gid://shopify/ProductVariant/44877928268057' OR id:'gid://shopify/ProductVariant/44877928333593'"
/>
@Jarvie127 I'm sorry this isn't working. Would you try this, please?
<ResourcePicker
open
resourceType="ProductVariant"
selectMultiple
initialQuery="id:44877928268057 OR id:44877928333593"
/>
Closing as stale. Please reopen if you're still having an issue!
Describe the feature you’d like
// How do I display all variants of a given ProductId? Thanks in advance!
<Resourcepicker resourceType="ProductVariant" initialQuery="productId:'gid://...'" ... />
// Dont Work...