Issue in sharing customer accounts globally
-
16-10-2019 - |
Question
- We have a magento installation and three websites with one store and store view each.
- mywebsite.com/
- mywebsite.com/store2/
- mywebsite.com/store3/
- Each website have different currencies.
- Share Customer Accounts is set to Global under System->CUSTOMERS->Customer Configuration->Account Sharing Options.
Now if a customer login at mywebsite.com/ and then go to other two websites he/she is logged in that website also, which is working as intended.
But if they login into mywebsite.com/store2/ or mywebsite.com/store3/, and then switch websites, they have to login again, why is this so?
Is this a bug? Or am I doing anything wrong?
Solution
I assume a problem with cookies here.
If you login on the path "/" the cookie is accessible on all sub paths. of you login on "/store2/" it is only accessible on "/store2/" and sub paths, so its not accessible from "/" or "/store3/".
There should be a way to force the cookie domain/path, so every store writes to the cookie to "/"
OTHER TIPS
The solution for the problem is here Magento Multiple Website Store - Login.
This allows you to login from anywhere under your domain which will reflect beyond it's scope. This solves the issue mentioned by FlyningMana.