> ## Documentation Index
> Fetch the complete documentation index at: https://docs.aftersell.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Order summary block

> Show the cart total, savings, item count, and applied discounts before checkout.

The **Order summary** block shows shoppers their cart total before checkout. Choose what appears on either side of the row, such as a **Subtotal** label on the left and prices on the right.

## Settings

Select **Order summary** in the cart editor. Use **Left side** and **Right side** to choose which parts to show. Each side displays its parts in the order you select them. To move a part to the other side, remove it from its current side first.

**Label text**, **Savings text**, **Savings format**, and **Item count text** appear only when you add the corresponding part to either side.

| Part | What it shows |
| - | - |
| **Label** | Text you enter in **Label text**, such as `Subtotal`. Leave it blank to hide the label. |
| **Price before savings** | The price before savings, crossed out. It appears only when the cart has savings. |
| **Total price** | The current cart total after discounts. |
| **Savings** | The **Savings text**, with `{{savings}}` replaced by the formatted savings. In **Savings format**, choose **Percent** or **Amount**. This part appears only when the cart has savings. |
| **Item count** | The **Item count text**, with `{{count}}` replaced by the cart's displayed item count. Grouped bundles count by bundle quantity, not by the items inside them, and shipping protection doesn't count. The default field value is `{{count}} items`. The cart displays it with the singular or plural item label. In custom text, use `{{cart_item_label}}` to insert that label. |
| **Discount codes** | Tags for applied discounts, including automatic discounts. They appear only when the cart has discounts to list. |

By default, **Label** appears on the left. **Price before savings**, **Total price**, and **Savings** appear on the right, in that order. The default label is `Subtotal`, and the default savings text is `({{savings}} off)` with savings shown as a percentage.

## Design

| Section | What you can customize |
| - | - |
| **Text** | Color, size, weight, line height, and letter spacing for the text parts you added. |
| **Style** | The block's background color. |
| **Discount tags** | Background color, text color, and border radius. This section appears when you add **Discount codes**. |
| **Spacing** | Horizontal and vertical padding and margins. |

## Placement and limits

New carts include **Order summary** in the filled cart footer, above the [Checkout button](https://docs.aftersell.com/aftersell/cart/checkout-button-block.md). You can add up to four **Order summary** blocks to the footer of each [cart state](https://docs.aftersell.com/aftersell/cart/how-carts-work.md). You can also hide or remove the block.

Existing carts can still use the [legacy Summary block](https://docs.aftersell.com/aftersell/cart/summary-block.md), but you can't add new copies of it.

## Custom template

Use the **Code** tab to turn on a [custom template](https://docs.aftersell.com/aftersell/cart/custom-templates.md#using-a-custom-template). The template replaces the built-in layout and controls the design. The block settings still supply its data. The editor disables the **Design** controls until you turn off the template.

| Prop | Type | What it contains |
| - | - | - |
| `leftSlotItems`, `rightSlotItems` | `OrderSummarySlotItem[]` | The parts selected for each side, in display order. The possible values are `label`, `pre_savings_price`, `total_price`, `savings`, `item_count`, and `discount_codes`. |
| `label` | `string` | The label text, or an empty string if cleared. |
| `totalPrice`, `preSavingsPrice` | `string` | The formatted cart total and price before savings. Both can include markup from the store's money format. |
| `savings` | `string` | The formatted savings value. It uses the store's money format for **Amount** and plain text for **Percent**. |
| `savingsText` | `string` | The sanitized **Savings text** with the formatted value inserted. It can contain markup. |
| `itemCount`, `itemLabel` | `number`, `string` | The displayed item count and the complete item-count text, such as `3 items`. Don't prepend `itemCount` to `itemLabel`. |
| `discountCodes` | `string[]` | The titles of all applied discounts, including automatic discounts. |
| `hasSavings` | `boolean` | Whether the cart has savings to show. |
| `isLoading` | `boolean` | Whether the cart is loading. An active Order summary template renders during loading, so use this value to show a loading state. |
