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

  1. 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)
  1. 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

Command icon 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

tbkot created an issue. See original summary.

jsacksick’s picture

Status: Active » Needs review

I 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?

  • jsacksick committed efdfdd1a on 3.x authored by tbkot
    feat: #3556701 Implement "Order details" sidebar card
    
    By: tbkot
    By:...
jsacksick’s picture

Status: Needs review » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.