# Order Summary

> OrderSummary, OrderSummaryTotalsList, and read-only cart atom reuse in checkout.

<!-- Sources: src/Components/Woo/OrderSummary/OrderSummary.php; src/Components/Woo/OrderSummary/OrderSummaryTotalsList.php; src/Components/Woo/CartItemTitle/CartItemTitle.php; src/Components/Woo/CartItemSubtotal/CartItemSubtotal.php; src/Components/Woo/CartAttributeList/CartAttributeList.php; src/Components/Woo/Shared/CartTotalProperties.php; client/src/domains/woo/components/order-summary.ts; client/src/domains/woo/components/cart-items.ts; src/Patterns/Testing/TestCheckoutDemo/TestCheckoutDemo.php; src/Testing/E2E/Woo/WooScenarioProvider.php; tests/e2e/components/woo/behavior.spec.ts; tests/e2e/components/woo/lifecycle.spec.ts -->

# Order Summary

`OrderSummary` renders checkout cart contents and totals. It is read-only by default and intentionally reuses cart item and total atoms.

## Components

| Component key | Role |
| --- | --- |
| `OmeWooOrderSummary` | Summary shell backed by cart store. |
| `OmeWooOrderSummaryTotalsList` | Totals list container for checkout summary totals. |
| Cart item atoms | Optional product row atoms in `product_atoms` or `full_atoms` modes. |
| Total atoms | Optional totals row atoms in `full_atoms` mode. |

## Content Modes

| Mode | Meaning |
| --- | --- |
| `propped` | The component renders product rows and totals from its own props and internal structure. |
| `product_atoms` | Authors provide the products slot with cart item atoms; totals stay component-managed. |
| `full_atoms` | Authors provide both products and totals slots. |

`TestCheckoutDemo` uses `full_atoms` so the checkout summary can style product rows and total rows with the same atom components used elsewhere.

## Props

| Prop | Meaning |
| --- | --- |
| `content.mode` | Summary rendering mode. |
| `content.include_attributes` | Whether product titles include attributes in propped mode. |
| `content.variant_separator` | Separator for composed variant titles. |
| `accessibility.aria_label` | Summary region label. |

The totals list uses the same `structure.root_tag` and list class pattern as `CartTotalsList`.

## Runtime Behavior

`order-summary.ts` subscribes to the cart store and renders summary rows from current cart data. The main Woo runtime excludes order-summary total fields from the cart-page totals binder so the summary binding owns its own subtree.

When authors use atom modes, cart item atoms and totals atoms still read the summary cart data. The order summary is read-only unless authors deliberately place interactive atoms inside it.

## Scenario Coverage

| Scenario | Covered behavior |
| --- | --- |
| `shipping_selector` | Order summary total changes after shipping selection. |
| `checkout_success` | Checkout can render order summary beside a real checkout form. |
| Lifecycle pricing test | Native Woo pricing hooks change totals rendered in cart and order summary. |
| `TestCheckoutDemo` | Full-atoms mode composes cart item title, attributes, subtotal, and all total atoms. |
