I have a single installation with multiple websites, I'd like to have the user be allowed to use their account on all websites, but not share a cart between them (as there will be different pricing rules / shipping options, etc..).
Is there a good way of doing this while not making the customer log in multiple times? Right now I have it so the domains of the websites are all
{website prefix}.site.com
But if necessary, I could switch to
site.com/{site prefix}
If that's the only way to do it.
Solved! Go to Solution.
Check the link I've sent you.
There are modules to restrict payment and shipments methods. Maybe that's the easy approach for you right now.
Just because curiosity. Why you will allow the same customer to be logged but then you won't allow to share the cart?
I mean, which would be the benefit to be logged into all sites if you can use it? (I'm trying to understand).
By default Magento won't allow to do that with the out-of-the-box configuration.
In my setup, there is a primary public website that anyone can access, and then several separate sites that are private (will require a specific customer group to access). So the only customers able to go to these private sites are already registered with an account and have that group set. I would like to have them not have to duplicate accounts to access the private sites as they are related.
For the private stores, there are custom payment methods not available on the public site, and because of that we don't want to share carts.
So the end goal is having a user be able to be logged into multiple sites, but have a different cart per site.
I understand the idea and I was looking into the markeplace for options: https://marketplace.magento.com/catalogsearch/result/?q=cart%20restrict#q=cart%20restrict&idx=m2_clo...
I didn't found anything useful.
I guess your problem is that you don't know which website will fill the cart first. So you should allow shared cart but if the cart is filled first form one website then you sould activate some kind of restriction. Am I on the right path?
Yeah I think you're on the right path, sharing user accounts is important in this case (unless there is a way to create custom payment methods / shipping options at a store level instead of a website level).
Is there a way to see what store ID a product was added from so that I would know what to clear?
RE : Is there a way to see what store ID a product was added from so that I would know what to clear?
-- Yes , as when we are adding products we have one option called - Product in websites - where we select any website we found store details as well , so that store details will be stored in database as well !!
Regarding your question - i have one suggestion that might work for you , as cart is always comes up with the Quote table , so if you wanted to separate cart for one customer which shares same login to site but cart is different you need to manage multiple quote table !!
Meaning when customer is adding product to any cart , all the details are storing in quote table , so along with you need to additionally save storeid/website id with that specific quote , same way for another quote , so you need to manage code level when any specific website will load , only that particular website quote table needs to be load on cart.
I know its bit tricky but not complex , you might can achieve this using this option only !!
Hope it helps !!
Check the link I've sent you.
There are modules to restrict payment and shipments methods. Maybe that's the easy approach for you right now.