How to use App Bridge functions in EASDK? Specifically the new resource picker.

patrickb
Shopify Expert
46 0 11

Shopify's documentation says that we can use some new AppBridge functions in the old EASDK - https://help.shopify.com/en/api/embedded-apps/app-bridge/migrating

 

I don't feel like migrating my app fully right now, but would love to use the resource picker (as mentioned, is available to use with the EASDK) -

 

 

This means that all existing embedded apps, without updating any of their code, get some of the benefits of Shopify App Bridge for free:

    more consistent cross-platform rendering and functionality
    access to better developer tools for debugging and better error reporting
    increased stability
    tighter integration with Polaris
    access to some new Shopify features, including the Navigation app extension and a new Resource Picker for products and collections

 

In saying that ... how do I use these App Bridge features within EASDK?

 

Currently I use the following line to initiate the product picker in EASDK:

ShopifyApp.Modal.productPicker(productPickerOptions, function(success, data) {

 

The equivalent for the resource picker in Bridge is:

 

 

const variantPicker = ResourcePicker.create(app, {
resourceType: ResourcePicker.ResourceType.ProductVariant,
});

 

How do I transfer this code over? I've tried different variations but nothing works.

 

Any ideas here?

Thanks!

Recipe Kit - Easy, beautiful & SEO friendly recipe cards on your Shopify blog posts - https://apps.shopify.com/recipe-kit
Wait.li - Product Waiting Lists for Shopify - https://apps.shopify.com/product-waiting-lists
Replies 3 (3)

iain-campbell
Shopify Staff (Retired)
54 9 23

Hi Patrick! Unfortunately the new Product Variant resource picker is not available in the EASDK. Only Product and Collection pickers are available.

To learn more visit the Shopify Help Center or the Community Blog.

patrickb
Shopify Expert
46 0 11

Hi Iain.

Ah, interesting - can you clarify in the documentation that this is not available then please? The documentation for sure makes it sound like the new product picker is available in EASDK.


Thanks.

Recipe Kit - Easy, beautiful & SEO friendly recipe cards on your Shopify blog posts - https://apps.shopify.com/recipe-kit
Wait.li - Product Waiting Lists for Shopify - https://apps.shopify.com/product-waiting-lists
iain-campbell
Shopify Staff (Retired)
54 9 23

I’ll look into clarifying the wording.

To learn more visit the Shopify Help Center or the Community Blog.