I have a Magento2.2.3 based multisite setup where each store view has a different url. Instead of the default store switcher i want to use an image (store logo) where customers can click the logo in the header.phtml to go to the other storeview and more importantly have the cart data stay.

So for example if a user goes to www.abc.com and adds an item to there shopping cart and then clicks on a logo to go to xyz.com (another storeview) the items they had originally put in there cart should stay in there cart in the new store view.

The issue I am having is that the storeview switches just fine but the cart data is not pulled into the new storeview and i think its because i need to have a SID on the urls used to get to the other storeviews however i can not find the php code to get/add the sid onto the urls.

suggestions? I want to do something like

<a href='xyz.com?SID=<?php eho "$magento_sid";?>'>XYZ.XOM</a>

Your Answer

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

Browse other questions tagged or ask your own question.