For the complete documentation index, see llms.txt. This page is also available as Markdown.

Custom Bundle UI

This guide walks through building a fully custom Build Your Own Bundle UI from scratch, using the Elite Bundle Builder SDK for data and actions while rendering your own HTML.

The built-in UI continues to work — you can replace individual parts or the whole thing.


Prerequisites

  • SDK access enabled in App → Settings → Developer SDK

  • A bundle product set up with at least one step

  • Access to your Shopify theme files


1. Add your HTML scaffold

In your theme, add the container elements where your custom bundle UI will render. Place these on the bundle product page — either in the product template or a theme section.

<!-- _theme/sections/custom-byob.liquid or similar -->
<div id="my-bundle-root" style="display: none;">
  <div id="my-steps"></div>
  <div id="my-cart-drawer">
    <ul id="my-cart-items"></ul>
    <p>Total: <span id="my-cart-total">$0.00</span></p>
    <button id="my-checkout-btn" disabled>Checkout</button>
  </div>
</div>
<div id="my-bundle-loading">Loading bundle…</div>
<div id="my-bundle-error" style="display: none;"></div>

2. Wait for the SDK to be ready

The SDK populates window.eliteBundle.sdk.byob after React mounts and products load. Listen for the ready event before reading any state.


3. Render steps and products


4. Keep the cart in sync

Listen for elite:byob:cart-change to update your UI after every cart mutation.


5. Handle checkout


6. Show a discount tier indicator (optional)


7. Handle errors


Resolving translated text

Step titles and descriptions are either a plain string or a translated object, so resolve them before rendering:

Multi-option bundles

A multi-option bundle uses this same SDK — its options arrive as steps, and each holds exactly one item. The one difference is how you record a pick: use selectOne instead of addToCart, so choosing a different item replaces the option's current pick rather than stacking a second one.

Adding to cart differs too: a multi-option bundle hooks the theme's own Add to cart button, so you normally do not call checkout() yourself. Gate on canCheckout to know when every option has been filled.

Hiding the default UI

If you want to replace (not augment) the built-in UI, hide it with CSS. The bundle renders inside a [data-byob-bundle] element.

On a bundle that renders inside the theme's product page, the app also hides the theme's own price and add-to-cart button. Hiding [data-byob-bundle] there leaves the page with no way to buy, so your replacement UI must supply its own add-to-cart.

Or hide it in JavaScript after the ready event, so there's no flash:

Last updated

Was this helpful?