Using the Account Selector Fragment

Liferay DXP 7.4 U72+/GA72+

The Account Selector fragment provides an easy way for users to switch between their accounts when browsing products and creating orders.

Tip

The fragment works best when you have the catalog, open cart, and checkout pages.

Adding the Account Selector Fragment to a Page

  1. Go to the desired content page or template and click Edit (Edit icon).

  2. In the Fragments and Widgets sidebar (Add Widget icon), search account selector.

    Search for the Account Selector fragment in the Fragments and Widgets sidebar.

  3. Drag and drop the fragment onto the page. Do not mistake this fragment with the Account Management widget.

  4. Click Publish.

    Click the account icon to open the account selector.

The account selector immediately shows the user’s selected account, if any exists.

Account Selector Details

After adding the account selector fragment to a page, you can click the account icon to open it. Here you can access the accounts you have permission to manage. You can also create a new order from the account selector by clicking the Create New Order button. For this to work correctly, you must have an Open Carts page.

When you have an active order, the account selector fragment displays the order number and its status right below the account name. If there’s an active workflow, the order is created with the Draft status.

Open the account selector to create a new order or switch between accounts.

Customizing the Account Selector: Hide Orders List

Beta Feature Liferay DXP 2025.Q3

Important

Currently, this feature is behind a beta feature flag (LPD-58472). Read Beta Feature Flags for more information.

With the proper permissions, you can configure the Account Selector component to hide the orders list for specific channels. This is useful in commerce environments that support only one order per channel, where listing multiple orders is unnecessary.

  1. Open the Global Menu (Global Menu), go to the Commerce tab, and click Channels.

  2. Select a channel.

  3. In the General tab under Orders, enable Hide Orders List in the Account Selector.

Enabling the option hides the orders list, but existing orders are still accessible.

Enable the Hide Orders List in the Account Selection option to remove the orders list from the Account Selector.