Current State
The admin order template (commerce-order--admin.html.twig) currently displays order information scattered across multiple sections:
- Store is shown in the entity-meta header (only if multiple stores exist)
- IP address is shown in the "Customer Information" section
- User account (uid) is shown in the "Customer Information" section
- Contact email (mail) is shown in the "Customer Information" section
- Additional order fields are shown in the "Other" section at the bottom
Desired State
Create a new dedicated "Order Information" details section in the sidebar that consolidates and displays:
- Store - The store associated with this order
- Cart Status - The order state (draft/cart status)
- IP Address - Customer's IP address
- User Account - Link to the customer's user account
- Contact Email - Customer's email address
- Additional Order Fields - Any custom fields added to the order entity
Requirements
-
Template Modification
- Modify
commerce-order--admin.html.twig(or create theme override) - Add new "Order Information"
<details>section after the entity-meta header and before "Customer Information" - Section should be open by default
- Use consistent styling with existing sections (claro-details classes)
- Modify
-
Edit Functionality
- Add an "Edit" button in the details section header/summary
- Button should trigger a modal dialog
-
Modal should contain a custom edit form with only the editable fields:
- Store (if multiple stores exist)
- User Account
- Contact Email
- Additional custom order fields
- Cart status (change should trigger transitions workflows)
Ideally, the edit functionality should open a form mode (order_details). We’d need an update hook to import the form display.
Issue fork commerce-3556701
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
jsacksick commentedI pulled the changes and I tried updating the email, but the change doesn't stick due to the OrderRefresh logic.
Could we make sure the "customer_email_overridden" data flag is set on the order?
Comment #5
jsacksick commented