Drupal is a registered trademark of Dries Buytaert
drupal 11.3.9 Update released for Drupal core (11.3.9)! drupal 11.3.8 Update released for Drupal core (11.3.8)! drupal 11.3.7 Update released for Drupal core (11.3.7)! drupal 11.2.11 Update released for Drupal core (11.2.11)! drupal 10.6.7 Update released for Drupal core (10.6.7)! drupal 10.5.9 Update released for Drupal core (10.5.9)! cms 2.1.1 Update released for Drupal core (2.1.1)! drupal 11.3.6 Update released for Drupal core (11.3.6)! drupal 10.6.6 Update released for Drupal core (10.6.6)! cms 2.1.0 Update released for Drupal core (2.1.0)! linkit 7.0.14 Minor update available for module linkit (7.0.14). masquerade 8.x-2.2 Minor update available for module masquerade (8.x-2.2). video_embed_field 3.1.0 Minor update available for module video_embed_field (3.1.0). bootstrap 8.x-3.40 Minor update available for theme bootstrap (8.x-3.40). menu_link_attributes 8.x-1.7 Minor update available for module menu_link_attributes (8.x-1.7). single_content_sync 1.4.15 Minor update available for module single_content_sync (1.4.15). eca 3.1.2 Minor update available for module eca (3.1.2). content_access 2.1.0 Minor update available for module content_access (2.1.0). editoria11y 3.0.2 Minor update available for module editoria11y (3.0.2). rebuild_cache_access 8.x-1.14 Minor update available for module rebuild_cache_access (8.x-1.14).

commerce_order_amend

1 sites No security coverage
View on drupal.org

Commerce Order Amend adds an "Amend Order" tab to placed Commerce orders, giving back-office staff a guided interface for post-placement order modifications.

Commerce core allows raw entity editing on orders but lacks the business logic around amendments: price protection, order refresh on placed orders, audit logging with SKUs, balance difference calculation, payment guidance, and event-driven extensibility for other modules to react.

Features

  • Swap item variations (same product or cross-product)
  • Add or remove order items
  • Add or remove coupons
  • Unit price override with currency locked to the order's currency
  • Price protection: all item prices are locked during refresh, preserving original checkout pricing
  • Refresh change detection: warns staff about unexpected side effects (promotions added/removed, tax recalculations) with a link to the order edit form
  • Payment balance tracking with actionable guidance (collect payment or issue refund)
  • Commerce Log audit trail prefixed with "Order Amended" for easy identification, including SKUs and reasons
  • Stock validation (optional, respects always-in-stock flag, requires Commerce Stock)
  • Configurable editable states via admin UI
  • Amendment types tracking field for Views filtering (which orders were swapped, had items added, etc.)
  • Event-driven architecture: dispatches OrderAmendEvent so other modules can react (stock adjustments, MTO sync, notifications, ERP integration)

Requirements

  • Drupal 10 or 11
  • Commerce 2.x or 3.x

Optional

How It Differs from Core Order Editing

Concern Commerce core edit form Commerce Order Amend Edit order items Yes (raw entity form) Yes (guided form) Order refresh on placed orders No Yes (forces recalculation) Price protection No Yes (locks all item prices, preserves original checkout pricing) Unit price override Manual field editing Integrated field with currency locked to order Refresh side effect detection No Yes (warns about unexpected changes) Variation swap detection No (stock unaware) Yes (handles stock for old and new) Audit log (who, what, why, SKU) No Yes (Commerce Log) Payment balance alert No Yes (shows difference with link to Payments) State-based access No Yes (configurable) Event dispatch No Yes (OrderAmendEvent) Stock validation No Yes (optional, respects always-in-stock) Amendment tracking for Views No Yes (multi-value field per operation type)

Known Limitations

Order Refresh on Placed Orders

Commerce core deliberately skips OrderRefresh on placed (non-draft) orders because the refresh pipeline can be destructive. This is tracked in #2875804: Order Refresh should work for non-draft orders, too: Order Refresh should work for non-draft orders, too.

This module forces a full order refresh after every amendment via setRefreshState(REFRESH_ON_SAVE). To mitigate the risks, it:

  1. Locks all item prices before refresh (sets overridden_unit_price on all items, preserving original checkout pricing)
  2. Detects side effects by comparing order state before/after refresh
  3. Warns staff about any unexpected changes with a link to the order edit form

Despite these mitigations, some side effects cannot be prevented:

  • Expired or usage-limited promotions may be removed or re-applied by the promotion processor
  • Tax rules that changed since the order was placed will apply the current rates
  • Availability checkers may flag items as unavailable

If Commerce core lands a selective refresh API, this module will adopt it to allow more granular control over which processors run during amendments.

Activity

Total releases
2
First release
Mar 2026
Latest release
1 month ago
Release cadence
0 days
Stability
0% stable

Releases

Version Type Release date
1.0.0-beta1 Pre-release Mar 22, 2026
1.0.x-dev Dev Mar 22, 2026