Shopping cart is shared between websites

Hi,
Running Litium Accelerator 6.0.0, I noticed something today when releasing an additional website. It seems as if the two websites share shopping cart (stored on logged in user). The two sites have the same language and looking at what’s stored in “ECommerce_ShoppingCart2” there’s no information about website in there as I might have expected.

[
{
“$type”: “Litium.Foundation.Modules.ECommerce.Data.ShoppingCartItemDataProvider+CartItem, Litium.Studio”,
“articleNumber”: “V-2079-2011”,
“quantity”: 1.0,
“languageId”: “94fedd3c-bbd2-4e96-b38b-0ed5b4d7f920”,
“comments”: “”
}
]

I this a bug or am I missing something? Do I need to workaround it storing WebSiteID as an additional orderinfo or something?

BR
Jonas Widenberg

If both websites have the same domain name, this can happen. Is that the case?

like website.com/sitea and website.com/siteb ?

The cookie that holds the shopping-cart id, is linked to the domain name i think.

For non logged-in users: If you use the same domain for both sites then they share the shopping cart because shopping cart is handled in session and you have the same session when you have the same domain. The solution is to use different domains.
For logged in users: If you have chosen to save the shopping cart for the logged in user then it will be used for all web sites regardless of the domain. As long as you are logged in to different web sites, the same shopping cart is used.

No they don’t have the same domain name. (Well, one of the is a sub domain). We save the cart on logged in users so no cookie is used as far as I know.

Ok. Wouldn’t it be nice to have WebSiteID stored there as well? I think that makes sense.

Did you try this?

var websiteId = Litium.Foundation.Modules.ECommerce.ShoppingCarts.Cart.GetCartWebSiteId();