Development
Bundled products

Bundled Products

When running an online store, shop owners may occasionally want to offer bundled products—a product that comprises several existing products from the store. For more information on how bundles work, refer to Shopify's documentation (opens in a new tab).

While bundling can offer several advantages, it also introduces certain challenges. One significant issue is that the frontend cannot natively determine whether a line item in the cart is a bundled product or a regular product.

Why is this a problem?

The issue lies in tracking available quantities. If not all products within the bundle have inventory tracking enabled, the bundle itself will also be unable to use tracking. As a result, by default, a bundle is likely to have untracked inventory. As mentioned on this page, this will cause the bundled product to be displayed as out of stock.

The current solution to this problem is the use of custom metafields.

Adding Custom Metafields

  1. In the bottom left of the admin panel, click the ⚙️ Settings button to open your shop's settings overview.

  2. Navigate to the Custom Data page.

  3. Go to the Assigned to All Products tab.

  4. Click the Add Definition button in the top right corner.

  5. Assign a recognizable name.

  6. The Namespace and Key fields should be set to custom.is_bundled_product.

  7. Choose a type, which should be True or False.

Once created, you can assign the metafield to bundled products by editing the desired product and setting this metafield to True.

⚠️
This is currently a temporary solution with obvious limitations, so this implementation may be adjusted in the future.