Overview

Bundle Builder lets you group several Craft Commerce products into one purchasable bundle. It adds to the cart as one line item at one price, while the customer still picks a variant for each component at checkout.

What it does

  • Editors set up bundle types first (each with its own field layout, SKU/description formats, URL settings and tax treatment), then create bundles under them, all through Craft's native element editor.
  • A bundle references one or more products, each with a quantity. The customer picks the variant for each product when adding to the cart.
  • Pricing is either fixed or automatic (the components' total minus a discount, kept in sync as component prices move).
  • Availability is gated by each component's stock, and once an order completes, each chosen variant's inventory comes down.
  • Tax follows the composite-vs-multiple-supply distinction common to VAT, GST and sales-tax regimes: composite (single rate) or multiple (apportioned per component).

How it works under the hood

A bundle is a Bundle element extending craft\commerce\base\Purchasable: a real purchasable with its own SKU, base price, tax/shipping category and snapshot. It doesn't track its own inventory; instead:

  • getIsAvailable() checks the post/expiry window and that every component has an in-stock variant.
  • On add-to-cart, the chosen variants are checked and written to the line item as readable options plus a machine-readable snapshot.
  • On order completion, that snapshot drives the inventory decrement of each component variant.
  • For multiple supply bundles, a custom tax adjuster splits the tax across components, against whatever tax rates and zones are set up in Commerce: VAT, GST, sales tax, or otherwise.

Next