Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Fetch product information in app extension

Fetch product information in app extension

kestutisbalt
Shopify Partner
11 0 9

What is the recommended method for retrieving product information based on their handle when developing an app embed?

I'm aiming to create an app (theme extension) that identifies all products on the current page and displays a badge accordingly. Since liquid doesn't offer a direct means of accessing all products on a page, I'll be implementing this functionality in assets/labeler.js.

 

For instance, consider a homepage featuring a section showcasing featured products. I intend for the badge to be integrated within this section, which necessitates utilizing JavaScript query selectors to locate product elements and subsequently querying Shopify for their respective information.

Replies 0 (0)