Who this is for. The theme developer restyling a member area. Afterwards you know which template to write for each screen, what it receives, and which ones need a template from you.
The screens
Paths are after /my-account. Route names belong to the MyAccount module, as in $_url->getPath('MyAccount', 'ordersListing'). Templates are paths under templates/, and a file at the same path in your site replaces the framework's (Template resolution order).
| Path | Route | Template | Variables | Framework copy |
|---|---|---|---|---|
/ | account | users/users/show.html | user; orders and quotes, two helpers with getRecentOrders(n) and getRecentQuotes(n) | Yes |
/addresses, /addresses/{page} | addresses | users/person-addresses/index.html | personAddresses | Write your own (below) |
/address (GET form, POST to add) | addAddress | users/person-addresses/add.html | countries, types | Yes |
/address/{id} (GET) | address | users/person-addresses/show.html | personAddress (also as record), countries, types | Yes |
/address/{id} (PUT, DELETE) | editAddress, deleteAddress | None: they redirect | ||
/orders, /orders/{page} | ordersListing | orders/orders/index.html | orders | Yes |
/order/{id} | orderDetails | orders/orders/show.html | order (also as record) | Yes |
/quotes, /quotes/{page} | quotesListing | quotes/quotes/index.html | quotes | No |
/quote/{id} | quoteDetails | quotes/quotes/show.html | quote (also as record) | No |
/wishlist, /wishlist/{page} | listWishlist | products/wishlist/index.html | wishlist | No |
/wishlist/{id} (DELETE) | deleteWishlist | None: it redirects | ||
/linked-accounts | listUserAuthenticators | o-auth/user-authenticators/index.html | enabledAuthenticators, userAuthenticators | No |
/passkeys | passkeys | users/passkeys/index.html | passkeys, passkeyEnabled, passkeyAllowed, hasEmail | Yes |
/applications | applications | o-auth/user-o-auth-clients/index.html | userOAuthClients | No |
/current-activity | currentActivity | users/users/current-activity.html | currentActivity | Yes |
Every screen requires a signed-in visitor, and every one except current activity also checks the CSRF token on writes. The lists are the signed-in member's own records: their addresses, their orders, their quotes. The screens for sign-in methods, passkeys and applications are covered in Authenticators, SSO and linked accounts; the address book in Addresses and the address book.
Which screens need a template from you
A screen with no template at its path, in your site or in the framework, does not fail with an error on a Smarty site. It answers HTTP 200 with a page that reads only Template not found: quotes/quotes/index.html, without your header or footer. On a Twig site it is an error. So:
- Write the four that have no framework copy before linking to them: quotes (list and detail), the wishlist, linked accounts and authorised applications. The framework does have files under
users/user-authenticators/andusers/user-o-auth-clients/, but the routes look undero-auth/and never read them. - Write your own address book list before offering the address book, rather than relying on the framework's copy.
- Treat the framework copies as a starting point, not a design. They are plain Smarty with bootstrap-style class names and extend the framework's bare
includes/frontend/base.html. On a Twig site they are Smarty source and cannot render, so a Twig site writes every screen it offers.
The account menu
Every framework member screen extends users/frontend/includes/account.html, which draws a side menu and gives each screen a block called accountContent. The menu links the account home, applications, current activity, linked accounts, passkeys, addresses, orders and quotes, in that order; the wishlist is not in it. Override that one file and every framework screen you keep picks up your menu. Take out the links to screens your site does not offer, since a link to quotes on a site without a quotes template leads to the "Template not found" page.