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.
Adding the Account Selector Fragment to a Page
-
Go to the desired content page or template and click Edit (
).
-
In the Fragments and Widgets sidebar (
), search account selector.
-
Drag and drop the fragment onto the page. Do not mistake this fragment with the Account Management widget.
-
Click Publish.
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.
Customizing the Account Selector: Hide Orders List
Beta Feature Liferay DXP 2025.Q3
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.
-
Open the Global Menu (
), go to the Commerce tab, and click Channels.
-
Select a channel.
-
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.