Documentation
Feedback
Guides
Storefront Development

Storefront Development
FastStore
Storefront features
Enabling My Account on your FastStore website
This is an experimental feature.
In this guide, you'll learn how to enable the experimental My Account feature in your store.
My Account is a crucial component for any ecommerce website, as it allows customers to manage their personal information, track order history, update security settings, and perform other account-related actions.
Unlike the previous version of the My Account, which was based on the VTEX IO platform and accessed through a subdomain configured in the discovery.config.js file, this FastStore-based setup allows you to build and manage My Account directly within FastStore.
For details on the previous version, refer to Integration the VTEX Order Placed and My Account. While that article discusses the Order Placed page, the experimental feature covered in this guide is solely related to the My Account section.

Default My Account pages

My Account includes several default pages that are essential for managing a customer's account.
  • src/pages/account/orders/[id].tsx: Displays individual order details, including items, quantities, prices, and statuses.
  • src/pages/account/user-details.tsx: Displays the user’s personal information, such as name, email, and contact details.
  • src/pages/account/security.tsx: Displays security settings, including password management.
  • src/pages/account/profile.tsx: Displays editable profile settings, allowing users to update personal information.
  • src/pages/account/orders/index.tsx: Display a list of all past and current orders placed by the user, including summary details for each.

Before you begin

Make sure you’re using @faststore/cli version 3.0.0 or above. If it’s not updated, see Updating the @faststore/cli package version.

Instructions

To enable the experimental My Account feature in your project, follow the steps below:
  1. Open the discovery.config.js file.
  2. Add the experimental object and set the enableFaststoreMyAccount value to true:
    discovery.config.js

    _10
    experimental: {
    _10
    enableCypressExtension: true,
    _10
    }

With the enableFaststoreMyAccount flag set to true, users accessing the /account path will be redirected to the /account/profile page.
The enableFaststoreMyAccount flag overrides the URL specified in the accountUrl property of the discovery.config.js file. If the flag is not set or set to false, users will be redirected to the URL configured in the accountUrl property.
Now that you have the experimental My Account enabled in your project, you can extend this feature by following the guide Extending My Account.
Contributors
1
Photo of the contributor
Was this helpful?
Yes
No
Suggest Edits (GitHub)
Contributors
1
Photo of the contributor
On this page