Headless storefronts
Read bundle definitions through the Storefront API without the theme block.
Everything the theme block renders comes from three metafields on the bundle’s parent variant, all readable with the Storefront API:
Metafield (namespace $app) | Contents |
|---|---|
component_reference | List of fixed component variant IDs. |
component_quantities | Quantity for each fixed component, in the same order. |
config | JSON: bundle price, customer choices (slots), savings label, enabled flag, component price snapshot. |
For a mix-and-match bundle, send the buyer’s picks as a cart line attribute named _bb_selection when adding the parent variant to the cart. Checkout expansion and the savings discount work the same as with the theme block.
The full schema of config and a worked Storefront API query are in the developer notes that ship with the app. Email cjvalera542@gmail.com for a copy.