Try our conversational search powered by Generative AI!

Manage tow website using single licence



We have two websites through a single licence. We are facing an issue while managing users and their shopping cart.

The user can login both websites using single login details but whenever they add a product to their shopping cart from website A the same product will display in the shopping cart of website B when they come to website B. In straight forward we do not want to share the shopping cart for different website for the same user.

If anyone having a solution please let me know.



May 08, 2017 7:43

Do you use market concept at all? To make thing easier you can define different markets for each site. For example, US-A for site A and US-B for site B, both for US market.

Another approach is to have the carts named differently, for example, "Default-A" for site A and "Default-B" for site B.

Episerver Commerce has APIs to load a named cart for a specific customer in a specific market. Carts are unique per name/customer/market.

May 08, 2017 9:24

Hey Quan,

Thanks for your reply.

I have created two separate markets as you mentioned but I couldn't find where should I assign this market for each website from commerce manager.

May 09, 2017 10:43

No, it's the way around. Each website can have multiple markets, you won't be able to " this market for each website from commerce manager". For each site you can use ICurrentMarket to set the current market for that website, and the code which relies on market with work accordingly.

May 09, 2017 10:47

Is this possible to set the current market in Session_Start of global.asax. Can you please send me the sample code for that.

May 09, 2017 11:45

You can just get the instance of ICurrentMarket (ServiceLocator.Current.GetInstance<ICurrentMarket>()), then call SetCurrentMarket with the market you want to use.

May 10, 2017 11:29
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.