PS PrestaShop Intermediate

Partial Shipping & Automatic Backorders (dfavailsplit)

Install, configure and understand the module that ships available stock and automatically places the rest on backorder.

Updated Module version 1.3.4

Overview

This module automatically splits every order according to the stock actually available. In-stock items ship immediately in an order ready for fulfilment, while out-of-stock items are moved to a dedicated backorder. Both orders share the same reference and their totals add up exactly to the original order, taxes included.

Everything triggers at order validation, and a line-by-line manual split is available on every order page.

Installation

  1. Upload the dfavailsplit folder to /modules/, or install the ZIP archive via Modules > Module Manager > Upload a module.
  2. Click Install.
  3. Open the configuration via Configure.

At installation, the module creates a dedicated order state “Awaiting restock (Backorder)” (orange). This state and the split history are kept at uninstallation to preserve your data.

Configuration

Go to Modules > Module Manager > dfavailsplit > Configure.

Enable automatic split

Main switch. When disabled, no order is split automatically; the manual split stays available on the order page.

Backorder order state

State applied to the order containing the out-of-stock items. Defaults to the “Awaiting restock (Backorder)” state created at installation.

Override the state of the shippable order

Optional. Enable it to force a specific state (for example “Processing in progress”) on the shippable order. When disabled, the order keeps its current state.

Free shipping on the backorder

Enabled by default. Shipping fees stay on the shippable order; the backorder is delivered free of charge, since the customer already paid shipping once.

Split partially available lines

Enabled by default. A partially available line (3 in stock out of 5 ordered) is split into 3 shipped + 2 backordered. When disabled, the whole line moves to the backorder.

Backorder email

Sends the customer an email in their language (FR/EN/ES/DE/IT/PL included, English fallback) announcing that the order will ship in several parts.

Regenerate invoices after split

Disabled by default. Leave it off to issue invoices when each order actually ships. When enabled, the module regenerates the invoices of both orders after the split if the current state requires it.

Logging

Records every split operation in the PrestaShop logs for traceability.

How the split works

The automatic split runs right after order validation (hook actionValidateOrderAfter, with an actionOrderStatusPostUpdate fallback for flows that do not emit it). The module derives each line’s shippable quantity from the real stock shortage, pooled per product and combination. This model stays accurate even for a manual split launched days later, once stock has moved.

Three cases arise:

  • Everything is available: no split. The order follows its course (optional state override).
  • Everything is out of stock: no split, the whole order moves to the backorder state.
  • Mixed order: the original order keeps the shippable part (shipping, discounts, wrapping, payment); a new backorder is created for the rest, with the same reference.

Totals (products, shipping, discounts, wrapping, weight) and the VAT breakdown are recomputed to the cent, line by line. The two orders add up exactly to the original order, taxes included, including on regenerated invoices and tax reports. Payment, aggregated by reference, reconciles natively.

The split is atomic: every mutation (backorder creation, line moves, totals, carrier, invoices) is wrapped in a SQL transaction. A mid-way failure rolls everything back, never a half-split order.

Manual split from the order page

On every unsplit order page, the “Availability split” panel shows a line-by-line table: product, ordered quantity, current stock and quantity to backorder. Fields are pre-filled with the stock analysis suggestion; adjust them freely, 0 keeping the line on the original order, then click “Split this order now”.

  • Available even when the automatic split is disabled.
  • An already-split order can never be split a second time.
  • The selection is refused when it would completely empty either order.
  • Customized lines and the “split partial lines” setting are honoured.

On the order page (back office)

Once the split is done, the panel links both orders: from the shippable order it points to the associated backorder, and vice versa. The shared reference is shown both ways.

Confirmation page and customer email

On the order confirmation page, a block lists the items that will ship separately, with a reminder of the shared reference and the shipping paid only once. The block works with every theme: it relies on the three confirmation anchors (displayOrderConfirmation, displayOrderConfirmation1, displayOrderConfirmation2) and resolves the order from the confirmation URL with secure-key verification, without ever rendering twice.

When the email option is active, the customer also receives an email in their language announcing the partial shipment and the free-of-charge backorder delivery. FR, EN, ES, DE, IT and PL templates ship in the module’s mails/ folder, with an English fallback for any other language.

The initial confirmation email (full order) is sent by PrestaShop before the split. The module’s backorder email then informs the customer about the shipment in several parts.

Edge cases and limits

  • Virtual products are never backordered.
  • Products under Advanced Stock Management (ASM) are excluded from the split and stay on the shippable order.
  • A customized line is never split: it is routed whole to one of the two orders.
  • When stock management is disabled in PrestaShop, no split takes place.

Troubleshooting

No order gets split

Check that the split is enabled, that PrestaShop stock management is active and that the products involved are neither virtual nor under Advanced Stock Management. An automatic split only happens on a mixed order (both available and out-of-stock items). For any other case, use the manual split on the order page.

The backorder shows shipping fees

Enable the “Free shipping on the backorder” option. Fees then stay on the shippable order only.

The block does not show on the confirmation page

Since version 1.3.4, the block renders with every theme through three confirmation anchors. If you run an earlier version, update the module.

Compatibility

PrestaShop 8.x and 9.x, multistore, no override, no Composer.

Was this page helpful?

Still stuck? Contact support