Context

A B2B merchant on Magento 2 sold volume-priced goods. Retail checkout flow confused wholesale buyers: they needed quoted prices per order, manager approval, then payment-not list price at click.

Off-the-shelf extensions either broke on upgrade or pushed checkout into a separate portal nobody wanted to maintain.

What I built

Magento module (namespaced, upgrade-safe):

  • Cart state Quote Requested - buyer submits cart with notes; payment disabled
  • Admin grid to approve/adjust line prices and expiry date
  • Buyer email with link back to cart; checkout enabled only while quote valid
  • Audit trail: who approved, old vs new price per line

No core overrides-plugins and observers only, documented in handoff for their agency.

Technical approach

Custom quote entity linked to quote_id, not stuffed in session metadata. Price locking via custom cart flags respected by their existing tax and shipping modules (tested on staging catalog clone).

Upgrade test plan included in delivery: run on 2.4.x patch release in staging before merchant clicked deploy.

Remote merchant: Loom walkthrough of admin approval + buyer return path.

Outcomes

  • Wholesale orders moved off email negotiation into trackable cart states
  • Survived two Magento security patches with no core file edits
  • Agency partner could adjust email templates without touching PHP

Stack

Magento 2 · PHP · MySQL · Knockout/RequireJS (admin UI) · REST for future headless option