Add pages to customer accounts
Merchants have diverse needs and some use cases won't fit into extension targets on existing customer account pages. For example, to create extensions for popular use cases like loyalty programs, wishlists, subscriptions, returns, and exchanges, a separate page is required. In these cases, build a full-page extension using the customer-account.page.render target. The full-page extension renders UI in a new page, below the header and above the footer.
How it works
Anchor link to section titled "How it works"Each full-page extension has a unique URL. You can build other extensions that link to a full-page extension URL. By default, your full-page extension allows direct linking. Merchants can add your full-page extension link to their online store or customer account navigation menus. They can also copy the page URL and add it anywhere.
Prevent direct linking
Anchor link to section titled "Prevent direct linking"Not all full-page extensions are suitable for direct linking. For example, if your extension requires the context of a specific order, then it’s best to extend the customer-account.order.page.render
target. This ensures that your extension isn’t available for merchants to link to. You can also create an order action or extend the Order status page to link to your full-page extension.
If your extension does not require the context of a specific order, but still should not be available for merchants to link to, you can declare this intent using allow_direct_linking = false
in your extension configuration file.
The following video shows the merchant experience of adding a page to the customer account menu:
Limitations
Anchor link to section titled "Limitations"Merchants and dev shops can't currently add full-page extension URLs to their customer accounts header navigation. This feature will be supported in a future release.
Each extension can only extend the full-page extension target once. You can create multiple new pages by creating multiple extensions. We recommend dedicating one page per use case.