- 06 Jan 2025
- 2 Minutes to read
- Print
- DarkLight
Enable multiple shopping carts
- Updated on 06 Jan 2025
- 2 Minutes to read
- Print
- DarkLight
To enable buyers to manage multiple shopping carts, there are three key functionalities to implement:
- Allow buyers to save their carts as drafts.
- Provide an overview of all carts.
- Enable buyers to manage individual carts.
1. Allow Buyers to Save Their Carts as Drafts
By default, a buyer has one active cart where all products are added. To allow buyers to create new carts, the current cart must first be saved as a draft. This feature requires administrator configuration.
Steps to Enable Draft Cart Saving
- Open Setup
- Search for All Sites in the Quick Find box
- Open the builder of the storefront site
- Navigate to the shopping cart page
- Select the Shopping Cart - Overview UI component
- Check the box in front of Enable save cart as draft
Once enabled, buyers will see a menu button next to the Checkout button containing the Save Cart as Draft option.
2. Provide an overview of all carts
When buyers have multiple shopping carts, they need an interface to view, access, edit, and activate individual carts. This can be achieved by creating a shopping cart overview page.
Steps to Create a Shopping Cart Overview Page
- Open Setup
- Search for All Sites in the Quick Find box
- Open the builder for the storefront site
Create a new page
- Open the Pages view (top of screen)
- Click New Page
- Select Standard Page
- Click New Blank Page
- Select preferred layout
- Enter a name (e.g., "Shopping Carts"), a URL, and an API name.
- Click Create
Add the Shopping Cart List Component
- On the new page open the Components list (lightning icon).
- Search for Shopping Cart - List View
- Drag the component onto the desired location on the page.
Add the Page to the Navigation Menu
- Select the navigation menu
- Click the Edit button
- Click Add Menu Item
- Enter a name, set Type to Site Page, and for Page select the newly created page
- Click Save Menu
After completing these steps, buyers can access the shopping cart list page from the navigation menu.
3. Enable Buyers to Manage Individual Shopping Carts
The default shopping cart page opens the buyer's active cart. To allow buyers to access and manage carts from the list view (including inactive ones), you need to create a Shopping Cart Record Detail Page.
Steps to Create and Configure a Shopping Cart Record Detail Page
- Open Setup
- Search for All Sites in the Quick Find box
- Open the builder of the storefront site
Create a new page
- Open the Pages view (top of screen)
- Click New Page
- Select Object Pages
- Search for Shopping Cart
- Select and click Create
- Open the Shopping Cart Detail page
Add the Shopping Cart Overview Component
- Open the Components list (lightning icon).
- Search for Shopping Cart - Overview
- Drag the component onto the desired location on the page.
- Select the component on the page
- Make sure that Shopping Cart Id field contains the value {!recordId}
You can publish the changes by clicking the Publish button in the right top corner of the screen.
By following these steps, you can provide buyers with a seamless experience for managing multiple shopping carts.