PS PrestaShop Intermediate

Bill of Materials — Kits & Assembly — Full Guide

Install, configure and use bills of materials (BOM): virtual kits with computed stock, component deduction on sale, assembly orders, computed pricing and storefront composition for PrestaShop 8 and 9.

Updated Module version 1.0.0

Overview and requirements

The Bill of Materials module adds BOM management to PrestaShop: any product can declare the list of its components with quantities, and the store automatically draws the consequences for stock and price. Two logics are available depending on your business: the virtual kit (computed stock, component deduction on sale) and physical assembly (manufacturing orders that produce finished product stock).

  • Compatible with PrestaShop 8.0 to 9.x, Classic theme and derived themes.
  • PHP 7.4 to 8.3.
  • Multistore and multilingual.
  • Components with combinations, multi-level BOMs, circular-reference protection.
  • PrestaShop-compliant architecture (ModuleAdminController, ObjectModel), no Composer dependency.

In virtual kit mode, the product’s stock is no longer entered manually: the module computes it as the minimum allowed by the components and updates it on every movement.

Installation

Install the module like any PrestaShop module:

  1. Download the datafireflybom.zip archive from your customer account.
  2. In the back office, go to Modules > Module Manager.
  3. Click Upload a module and drop the archive.
  4. Once installed, click Configure if you want to adjust the global settings.

On install, the module creates its tables (dfbom, dfbom_component, dfbom_assembly_log), registers its hooks and adds the Bills of Materials / BOM tab under Catalog. BOMs are then managed from each product page.

Global module settings

The configuration page (Modules > DataFirefly BOM > Configure) gathers the global settings and the list of existing BOMs:

  • Real-time synchronization: automatically recomputes the stock of virtual kits and computed prices whenever a component’s stock or price changes. Enabled by default.
  • Allow negative stock: lets you assemble or sell even if component stock is insufficient (just-in-time). Disabled by default.
  • Resync all stocks / prices: a button that recomputes the stock and price of all active BOMs at once. Useful after an import or data migration.

Creating a BOM

Open a product page, then the Modules tab: the Bill of Materials / BOM panel appears. Enable the BOM with the switch at the top, then follow the numbered steps.

1. Choose the stock mode

  • Virtual kit: the product’s stock is computed automatically from the components and every sale deducts them. Ideal for made-to-order boxes and bundles.
  • Physical assembly: the finished product has its own stock, fed by assembly orders. Ideal for batch manufacturing.

2. Choose the pricing mode

  • Fixed price: the price stays the one set on the product page. No recalculation.
  • Computed price: the price becomes the sum of the component prices, minus a percentage discount you enter. Recomputed automatically when a component’s price changes.

3. Add the components

Use the search field to find a product by name, reference or ID. Results show the thumbnail, reference, stock and price; click to add the component. Each row lets you set the required quantity with the +/− buttons. You can add a specific combination as a component (it appears separately in the search).

The four indicators at the top of the panel (components, buildable quantity, component cost, computed price) update live as you adjust quantities and discount, before you even save.

4. Save

Click Save the BOM. The module saves the BOM, immediately recomputes the kit’s stock (virtual mode) and applies the computed price if applicable.

Virtual kit mode

In virtual kit mode, the product’s stock is the minimum its components allow: for a box needing 2 hammers and 1 case, with 120 hammers and 40 cases in stock, the kit shows 40 available units.

  • On order validation, each component’s stock is deducted according to the BOM quantities, then the kit’s stock — and that of all kits sharing those components — is recomputed.
  • On cancellation or refund of a line, the components are automatically restored.
  • If real-time synchronization is active, any change in a component’s stock (direct sale, restock, another kit) updates the stock of the affected kits.

Virtual kit mode assumes the kit itself is a product without combinations: the computed stock is set on the product (combination 0). Components, however, can be combinations.

Physical assembly mode

In assembly mode, the finished product keeps its own stock. You feed it with assembly orders from the product page panel:

  1. Enter a quantity (the Max button shows how many your component stock allows you to build).
  2. Click Assemble: the components are consumed and the finished product stock increases.
  3. Click Disassemble for the reverse operation: the finished product is deducted and the components restored.

Every operation is logged in a history with employee, date, operation and quantity. The full history is available under Catalog > Bills of Materials / BOM.

If negative stock is not allowed, assembly is blocked when component stock is insufficient, and disassembly when finished product stock is insufficient. A message shows the maximum possible.

Computed price

In computed price mode, the kit’s tax-excluded price equals the sum of its components’ tax-excluded prices (multiplied by their quantities), minus the defined percentage discount. This price is written on the product page and recomputed:

  • each time the BOM is saved;
  • when a component’s price changes, if real-time synchronization is active;
  • on a global resync from the configuration page.

In fixed price mode, the module never touches your product page price. The computed price is still shown for reference in the panel, but is not applied.

Multi-level BOMs and combinations

A component can be a specific combination of a product (size, color…) or itself a kit with its own BOM. Sub-assemblies then nest across multiple levels and stock calculations cascade. The module detects and blocks circular references, even indirect ones, at save time: a kit cannot contain itself.

Storefront composition

A checkbox “Show the Composition tab on the storefront product page” lets you, per product, present the kit contents to your customers. A Composition tab then lists each component with its image, quantity and a link to its page. When disabled, the BOM stays completely invisible on the storefront.

FAQ and troubleshooting

The kit’s stock doesn’t update

Check that the BOM is active, in virtual kit mode, and that real-time synchronization is enabled in the settings. A Resync all stocks / prices button on the configuration page forces a full recalculation.

The computed price isn’t applied

The price is only written on the product page in computed price mode. In fixed price mode, the displayed value is indicative. Also check that the components have a price set.

I can’t assemble

Without negative stock allowance, assembly is limited by component stock. The Max button shows the maximum possible quantity. Enable Allow negative stock in the settings if your workflow requires it.

A circular reference message appears

You are trying to add as a component a product that already contains (directly or through a sub-kit) the product being edited. Remove that component or reorganize your BOM tree.

Can I sell components separately?

Yes, that’s the typical scenario. Each component remains a normal product, sellable individually. The module keeps everything consistent: any sale, of the standalone component or the kit, updates the stocks and buildable quantities of all affected kits.

What happens on uninstall?

Uninstalling removes the module’s tab and hooks, drops its tables (dfbom, dfbom_component, dfbom_assembly_log) and its configuration variables. Stocks and prices already written on product pages remain as they are.

Was this page helpful?

Still stuck? Contact support