Logistics Engine

Shopware Dropshipping: A Bin-Packing Engine for Shipping Cost

Shopware 6 cart processor that solves shipping cost as a bin-packing problem: mixed carts pack into the cheapest real combination of parcels and pallets, live at checkout.

Industry:
E-commerce / Dropshipping
Project Type:
Logistics Engine
Duration:
2+ years (ongoing)
Location:
Germany
Published:
Shipping bin-packing engine case study cover
Outcome
5
Package types priced
16
Volume classes mapped
11
Schema migrations since 2023
Live
Checkout-time calculation

The Challenge

A German dropshipping shop selling potted plants and garden goods across dozens of suppliers needed shipping cost to reflect actual packing, not a flat guess. A cart with three small pots and one large one doesn't cost what five identical pots cost to ship, and getting that wrong on every order adds up fast.

Critical Pain Points

  • Products came in wildly different pot sizes, from 1 litre up to 65 litres, each taking up different space in a parcel versus a pallet
  • The cheapest shipping option changes depending on the exact mix in the cart: sometimes a pallet beats five parcels, sometimes it doesn't
  • Certain products legally couldn't ship to German islands, and the cart had to catch that before checkout, not after
  • Free-shipping products and standard freight products couldn't always mix in the same package without breaking a pricing rule
  • Cross-border orders needed a simpler pricing path than domestic ones, without duplicating the whole checkout flow

Getting shipping cost wrong on every order either ate margin silently or overcharged customers enough to lose the sale. Neither was acceptable at the order volume this shop was running.

The Solution

I built a cart processor that calculates the actual cheapest packing combination live, every time the cart changes, instead of estimating shipping with a flat rate.

Volume-mapped packing calculation

Every product's literage maps to a space-usage percentage across five package types: standard parcel, half pallet, Euro pallet, industrial pallet, XXL pallet. The cart processor finds the combination that fits the whole order at the lowest cost.

Typed errors instead of silent failures

German-island shipping restrictions, free-shipping conflicts, and freight-package conflicts each throw their own exception, caught by the cart processor and surfaced to the customer as a specific error before checkout.

Automatic fallback for cross-border

Non-German orders skip the packing calculation entirely and price on a flat parcel-only rate pulled from the shipping method, so the complexity only applies where it's needed.

Suppliers notified without a human in the loop

A scheduled command emails each supplier their portion of every order automatically, with every send logged so nothing fails silently.

Results & Business Impact

Shipping cost matches what shipping actually costs

The packing calculation prices each cart against real parcel and pallet combinations instead of a flat estimate.

Restricted shipments blocked before checkout, not after

German-island and freight-conflict rules stop the order at the cart, with a specific reason the customer can act on.

Cross-border orders stay simple

The flat-rate fallback keeps international pricing predictable without forcing the full packing logic onto every order.

Eleven migrations, still evolving

The schema has grown with the shop's product range since 2023, adding new package types and edge cases as they showed up in real orders.

Technologies Used

  • Shopware 6.6
  • PHP 8
  • Custom Cart Processor
  • DAL
  • Typed Cart Exceptions
  • Mollie Payments
  • CLI Automation

Flat-rate shipping losing you margin?

If your catalog has products of wildly different sizes, a flat shipping rate is either overcharging some customers or eating your margin on others. Let's talk through what a real packing calculation could do for your checkout.

Book a consultation

Share this case study

Found this interesting? Share it with your network