Fetch product information in app extension

Fetch product information in app extension

Shopify Partner
11 0 10

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)