I am using a multistore setup and have an issue regarding using the same session after login.

If login with the same user and password and add a product to the cart, that product is showing up in both stores carts.

If I add something to the cart, it should only show in the store site in which I added the product, but not in the other store. What do I need to do? Subdomain ie. store1.testsite.com and in that other store was created having url store2.testsite.com


You are seeing cart sharing because your stores are under the same domain. You need to set system->config->web->session validation settings->use sid on frontend to no if you have a store switcher and then have your store running under different domains/subdomains. The frontend cookie contains the session id for the current session and as this and the session data are not accessible in domains other than that which they were created the session id will be unique to each store and so you will not have cart sharing anymore. Bear in mind however that a cookie set for domain testsite.com will be accessible in all subdomains i.e. store1.testsite.com and store2.testsite.com.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.