Description:
The current implementation of the /cart page in Commerce Cart displays all carts associated with a user or session. While this is suitable in some scenarios, it can create confusion for users when multiple carts (draft or abandoned) are shown.
This issue isn't limited to multi-store setups. A common scenario arises when a user creates a cart while logged in, logs out, creates a new cart anonymously, and then logs back in. In this case, both carts are displayed on the /cart page, which can disrupt the user experience.
Proposed Feature:
Provide fine-grained control over the display of carts on the /cart page via module settings or Views configuration. For instance:
A setting to restrict the /cart page to display only the active cart tied to the current session or the most recently created cart.
An option to determine how multiple carts (if present) are handled, such as merging them or hiding older carts.
Use Cases:
Single active cart: A common requirement for most e-commerce stores where displaying only the active cart avoids confusion for users.
Prevent duplicate carts: For users switching between logged-in and anonymous sessions, ensure only one cart is displayed after login.
Better UX for logged-in users: Prevent showing older abandoned carts when users log back into their account.
Possible Solutions:
Introduce a configuration in the Commerce Cart module settings to manage cart filtering on the /cart page.
Provide a configurable filter in Views for commerce_cart_form to allow displaying only the active cart (e.g., based on session or most recent cart).
Update the cart block logic to ensure the cart summary aligns with the active cart display.
Conclusion:
This enhancement would make the module more adaptable to a wider range of use cases while improving user experience on the /cart page.
Thank you for considering this proposal!