- Spartacus storefront
- Accelerator storefront (JSP)
1
Locate the order confirmation component
In a Spartacus storefront the order confirmation page is rendered by the
OrderConfirmationModule (typically order-confirmation-thank-you-message.component.ts / its CMS-mapped component). If you’ve customised checkout, confirm which component renders the confirmation route in your app.2
Add the wrapper div
Extend or override the confirmation component’s template to include:
3
Inject the tag with order data
In the component’s TypeScript, once the Map
Order object resolves (from OrderFacade/CheckoutService), dynamically inject the script tag with the order details populated:<INSERT_*> placeholders to fields on the resolved Order (e.g. order.deliveryAddress.firstName, order.code, order.totalPrice.value, order.totalPrice.currencyIso), URL-encoding each value.Troubleshooting
Order data isn't available at render time
Order data isn't available at render time
In Spartacus, ensure you’re subscribing to the resolved
Order observable rather than reading a snapshot before checkout completes. In Accelerator, confirm orderData is populated in the model before the JSP renders (check your controller/facade).