Hello developers,
I am encountering an issue with a Shopify-based website where the cart persists across users even after logging out. Here’s the scenario:
- A user logs in and adds products to their cart.
- The user logs out and the products still remains in cart.
- When a different user logs in, the cart still contains the products from the previous session.
My Questions:
- How can I ensure the cart is cleared when a user logs out?
- Is there a best practice for managing cart data in Shopify, especially when dealing with multiple users on the same device or browser?
Any insights or guidance on how to resolve this would be greatly appreciated. Thanks in advance!