I have a requirement like this:
"Single backend admin site. Front end shows a main eCommerce website from which another website should open based on Product Category selection.
I mean there will be one site. If one user selects a Product Category named "Men" then the user should go to another website called "menshopping.com" or some other domain name."
At present i have created two websites in magento 2.1.3 admin panel. One website url is called "womenshops.local". This is the main website. so admin url will become "womenshops.local/admin_test". Then i have created another website with url "menshops.local" having separate store and store view.
I am able to load these two domains separately. womenshops.local has a root category of "women" and menshops.local has a root category of "men". Therefore each websites shows different top level menu.
Now my issue is I don't know how to connect these two websites together and share customer and cart details between these websites. I had searched so many blogs and tried some solutions. But nothing worked.
My Magento root .htaccess file change:
SetEnvIf Host .*womenshops.local.* MAGE_RUN_CODE=base
SetEnvIf Host .*womenshops.local.* MAGE_RUN_TYPE=website
SetEnvIf Host .*menshops.local.* MAGE_RUN_CODE=men_site
SetEnvIf Host .*menshops.local.* MAGE_RUN_TYPE=website
I hope someone can point me in the right direction with this issue.
Best Answer
To me, you should not use two different websites but two different stores instead.
Quoting this SO answer: https://stackoverflow.com/a/16953750/1038727
In your case I'm pretty use using two different stores under the same website will save your time and match your requirements ;)