Skip to main content

Customer account

Customers manage their pre-orders at My Account → My Pre-orders.

Layout​

Added to the customer account sidebar via view/frontend/layout/customer_account.xml. The page itself lives at customer/account/preorders and renders through Block/Customer/PreorderList.php + view/frontend/templates/customer/preorder/list.phtml.

What the customer sees​

Per pre-order:

ColumnContent
Pre-order #Increment ID
Order #Source order link
StatusColour-coded enum
ProductName + image
Deposit paidCurrency-formatted
Balance owedCurrency-formatted, prominent if > 0
Available fromStock availability date
ActionsCancel / Pay balance / View order

The actions​

Cancel​

Available when the pre-order status is pending or awaiting_stock.

Controller/Customer/Preorders.php handles the action:

  1. Cancels the pre-order entity, status moves to cancelled.
  2. Reverts the MSI reservation via Model/Inventory/ReservationManager.php.
  3. Refunds the deposit through Magento's standard refund flow if configured.
  4. Logs the cancellation in byte8_preorder_notification.

Pay balance​

Visible when the pre-order is ready with an outstanding balance — covers all three paths:

  • Vault capture is disabled and stock has arrived (the tokenised email flow).
  • Stored vault token failed all retries (status vault_capture_failed).
  • Admin manually triggered Mark Ready.

Controller/Order/Complete.php handles it:

  1. Accepts either a tokenised URL parameter (from the Pay Remaining Balance email; validated via hash_equals so it works for logged-out customers) or a customer-session ownership check (for logged-in customers paying from the My Pre-Orders page).
  2. Adds the completion product (provisioned by Setup/Patch/Data/CreateCompletionProduct.php) to the cart, priced at the outstanding balance.
  3. Routes the customer through standard checkout to pay with whatever payment method they choose.
  4. Observer/ProcessCompletionOrder.php fires when the completion order is placed, records the payment, marks the pre-order as complete, and links the completion order back to the original. The token is cleared on success.

The same controller works for guests (via the emailed link) and logged-in customers (via My pre-orders → Pay balance). One code path, two entry points.

View order​

Standard Magento link to the source order page, where the customer sees the original deposit invoice and any subsequent invoices generated by vault capture.

Empty state​

When the customer has never placed a pre-order, the list shows a friendly empty state with a CTA back to category browse. No "Sign up for newsletter" upsell — this is a transactional page.

Permissions​

The page is gated by the standard customer_logged_in requirement. Guest pre-orders (yes, supported) don't appear here — guests instead receive email links with signed tokens for the same actions, see Email configuration.

Theme overrides​

The phtml template uses the module's CSS variables (declared in view/frontend/web/css/source/_module.less) so retheming for your design system is a single LESS override. No deep template surgery required.