§5.14
Closing Phase 11: order contract summary, compatibility and required rules
- Phase 11.5
- theme 1.15.0
Phase 11's theme contract is in §5.10–§5.13; this section gathers it in one place and gives the rules added in 11.5.
Pages and data (summary)
| Stage | File | Main data | Details |
|---|---|---|---|
| 1–2 Configuration, add-ons | configureproduct.wcp |
$product, $state (cycle, quantity, panel, panels), $form, $summary, $problems, $stages |
§5.10, §5.11, §5.13 |
| Cart | cart.wcp |
$items (kind per line), $groups, $summary, $coupon, $suggestions, $links |
§5.10, §5.11, §5.13 |
| 3 Billing profile, 4 Summary | checkout.wcp |
$step (preview / profile / review; details in older themes), $steps, $profile, $review (coupon, agreements, ref, changed) |
§5.12, §5.13 |
| 5 Proforma and payment | ordercomplete.wcp |
$proforma, $status, $methods, $pay_action, $request_key, $stages |
§5.12, §5.13 |
| Shared | all pages | $cart_badge {count, label} |
§5.13 |
| Domain | domainchecker.wcp |
cart {mode, action, url} on a result |
§5.11 |
Price data: every amount is the server's formatted text (currency and locale format included). The theme does not calculate, add or round amounts in the browser; forms contain no amount fields (ignored if sent). Coupon discount, tax breakdown and renewal amount also come from the server.
Product links: /l/{code} opens the order page with ?pl=code. Pre-selections (cycle, coupon, domain step, configuration) are placed into $state / $form from the server record; the theme does not read cycle or coupon from the address.
Required (from 1.15.0)
- The card payment form is outside the flow: the card form on the proforma carries
data-flow-off. The bank redirect (an auto-submitted POST page for providers that send fields) cannot be turned into a flow response; without the marker the client cannot reach the bank. In your custom theme, add this attribute to thename="method" value="card"form inordercomplete.wcp. Saved card, balance and transfer forms can stay in the flow. - Flow error notice: the flow root (
#wi-flow) carries thedata-flow-failedanddata-flow-limitedtexts. On a non-JSON response (429 too many requests, 5xx)theme.jskeeps the region, adds arole="alert"+data-flow-errorbox at the top of the scope and announces it from the live region; on 419 it reloads the page. A theme with its own flow script must not open the submission address with GET (only POST is accepted).
Accessibility (flow)
- The live region (
aria-live="polite") announces thedata-flow-updatedtext on every region change; focus goes first to an error ([aria-invalid],[role=alert]), otherwise toh1. - The stage indicator carries text ("4 Summary"); the current stage is distinguished by number and text, not colour alone.
- On error the coupon field has
aria-invalid="true"and is linked to the error text witharia-describedby. - On the confirmation form a server error appears at the top in a
role="alert"box; required agreement boxes arerequired+aria-required. - The mobile bar hides while the keyboard is open; its button is
aria-disabledwhile the form is invalid (clickable, shows an explanation).
Right to left: <html dir> comes from the language's direction ($page['dir']). Use logical CSS properties. These values are shown with a dir="ltr" wrapper on RTL pages too: domain, email, phone, IBAN, coupon code, order / invoice number, ID and tax number. The core email skeleton, invoice / quote documents and the payment redirect page also carry dir (1.15.0 / alpha.85).
Backward compatibility
| Theme | Works | Note |
|---|---|---|
| 1.15.0 | The whole flow | — |
| 1.14.x | The whole flow | Without data-flow-off on the card form, card payment with a field-sending provider does not reach the bank (B3); update |
| 1.13.x and older (custom themes) | Full-page flow; payment step in the 11.3 style (with account details) | checkout_profiles not declared → a visitor who is not signed in goes to login, missing details go to the billing form (§5.13) |
Unmarked theme (no <!--wi-flow-->) |
Full page | Does not request flow JSON; old behaviour |