---
title: Inventory
date: 2026-07-02T14:37:00+01:00
author: John Henry Donovan
canonical_url: "https://johnhenry.ie/plugins/bundle-builder/docs/guide/inventory"
section: Plugins
---
esc

↑↓ to navigate↵ to selectesc to close

Menu On this page 

- [Return to top](#)

Documentation

Documentation

# Inventory

A bundle **doesn't track its own inventory** (`inventoryTracked` is always off). Instead, stock comes from its component variants, and is decremented against them.

## Availability

`Bundle::getIsAvailable()` returns `false` if any component product has **no** purchasable, in-stock variant. A component with an untracked variant is always treated as available.

So a bundle goes unavailable automatically when a component sells out; no manual disabling needed.

## Decrement on order completion

When an order completes, the bundle's `afterOrderComplete()` reads the line item's frozen [snapshot](https://johnhenry.ie/plugins/bundle-builder/docs/guide/cart-variant-selection) and, for each chosen **inventory-tracked** variant, brings its available stock down by:

```bash
component quantity × line item quantity
```

…using Commerce's `Inventory::updatePurchasableInventoryLevel(…, ADJUST)`, with a note recording the bundle SKU. Untracked variants are skipped.

Tip Commerce calls `afterOrderComplete()` once per line item during the order's single completion transition, so stock only comes down once per bundle line.

On this page
