# Block Extension

The block extension adds a draft orders section to existing customer account pages.

### Where to add

You can add the Draft Order Magic block to:

* Order index page
* Profile page
* Order status page

### Adding the block

1. Open theme customizer
2. Navigate to desired customer account page
3. Click **Add block** or **Add section**
4. Find **Apps** section
5. Select **Customer Draft Orders**
6. Drag to position as desired
7. Save

### Block settings

#### Content settings

**Heading** - Title shown above draft orders list (default: "Draft Orders")

**Introduction text** - Optional description shown below heading

**Empty state message** - Shown when customer has no draft orders

**Pay button text** - Label for payment button (default: "Pay now")

#### Visibility settings

**Hide when empty** - Toggle ON to hide block if customer has no draft orders

**Only show with tag** - Only display draft orders with specific tag (leave blank to show all)

**Required tag** - Draft orders MUST have this tag to display

#### Display settings

Some themes allow background color, text color, border style, spacing/padding, and card style configuration.

### What customers see

When customer has draft orders, block displays:

* List of draft orders (most recent first)
* Draft order number
* Date created
* Total amount
* Status
* Pay now or View details button per order

When clicking a draft order, a modal shows all line items, quantities, prices, line item properties, and pay now button.

### Troubleshooting

#### Block not showing

* Verify block was added and saved
* Verify theme was published
* Check customer is logged in
* Check customer has draft orders
* Review "Hide when empty" setting
* Check tag filtering settings

#### Draft orders not appearing

* Verify draft orders are assigned to logged-in customer
* Check draft orders are "open" status
* Verify tag filtering matches draft order tags


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://responsive-media.gitbook.io/draft-order-magic/customer-accounts/block-extension.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
