Magento – Make same customer use different sessions on different browsers

session

Unfortunately, due to circumstances beyond my control, I need to make
the following configuration work:

Alice logs in as a Customer with username foo.

Then Bob logs in as the same Customer (foo) on a different browser.

Alice and Bob each have separate shopping carts. When Alice adds
something to the cart in her browser, Bob's cart is not affected.

In Magento's default configuration, Alice and Bob share one cart
stored on the server, and thus the cart is synchronized between them.
Is there any way I can force Magento's sessions to work the way I need
them to?

Best Answer

Technically speaking, each user has a different session. The "problem" for you is that a quote object is tied directly to the customer, not the browser session. This is necessary to have saved carts. And as @ashfame pointed out, this is a poor design decision.

Beyond this being a poor design decision though, what you want is not going to be easy (nor simple). Doing this would require massive amounts of custom code, would necessitate redesigning database schemas and refactoring tons of quote related code and logic. At the end of the day, it's going to be buggy and won't work with the customer cart functionality in the admin, since the admin was only designed to have one cart per customer.

To me, and without any context of the client needs, it sounds like you are dealing with B2B user scenarios which should be solved in other ways.

My suggestion is, go back to the drawing board. Don't try to simply bend Magento to do something like this…it will bit you in the end unless you have hundreds of man hours to throw at it and are willing to create a site which will be 100% non-upgradable without rebuilding all the custom development work. Most clients will thank you if you are willing to explain why what they want is a poor decision and instead recommend an alternative approach.

Related Topic