Can the cart store items independently for each Store?
How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!
While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.
Legacy Article
You are viewing an article from our legacy "FastTrack"
publication program, made available for informational purposes. Articles
in this program were published without a requirement for independent
editing or verification and are provided"as is" without
guarantee.
Before using any information from this article, independently verify its
suitability for your situation and project.
Issue
- The use case is a marketplace (B2B2C) scenario.
In that marketplace, there are multiple EC sites under the umbrella. There are cases where a user starts shopping at Store A, putting Store A items in a cart, then goes shopping at Store B, and putting Store B items in a cart.
In this case, can the cart store items independently for each Store? (We see when you go to Store A and try to purchase, you only see items of Store A in the cart even you have unpurchased Store B items in a cart, for example).
Environment
- Liferay Commerce out-of-the-box.
Resolution
- The cart as orders, is linked to the channel not to the site. So as far as the channel is the same, the cart can accept any product.
- However, since usually the channel is linked to a site, your configuration is probably:
Store A -> Channel A - Site A
Store B -> Channel B - Site B
In this case the cart is not shared: each time you change site (so you change the channel scope) the related cart is selected.
So product are not just hidden, but you are seeing different carts per each site.
Did this article resolve your issue ?