Context
Part of an ongoing engagement on torimpex.pl (WooCommerce grocery wholesale, since 2023) — this thread: N+1 and bundle promotions. The wholesale needed sales mechanics: buy X units — next free/cheaper, plus cheaper packs of related products. Manual discount math with portioned goods and multi-packs caused errors and support tickets.
Period: September 2026
Scope
- N+1 promotions — quantity thresholds, cheapest line free or at promo price; correct math for portioned products and multi-packs.
- Bundles (“cheaper in a set”) — detecting complete combinations in the cart and applying a package price instead of the line sum.
- Live cart recalculation — price and promo message updates on add/remove (AJAX), without reload.
- Conditions and exclusions — combined rules, minima, categories; safe math when several promotions apply at once.
- Admin configuration — rules without code changes, with visibility on product and category.
Result
- The wholesaler configures N+1 and bundles in admin; the customer sees the discount immediately in cart, without a calculator.
- WooCommerce cart rules — N+1, bundles, AJAX recalculation, portioned/multi-pack support.
