1

I'm making a magento installation and i'm looking to do something like this. Have a main website, and multiple small ones. All the products will be available in the main website. Now if a user shops from the main website he will be charged for the shipping costs for the store the item is in. If those items are from multiple other stores then those fees will all add up.

Any way i can do this ? Any extension even available or similar to this ?

Thank you

1

I hope it is that what you need.

Here is how we share cart between Magento multistore setup on different domains, but will works also with different stores:

Magento configuration:

  1. Create 2 different stores, store views under a single website. enter image description here

Also check if you have assigned respective root categories to their stores like this:

enter image description here

  1. Assign Domains to Stores

Now assign yourprimary domain to the main store.

  • Go to Admin -> Stores -> Settings -> Configuration. Now click on General -> Web in the left tab. In the “Base URLs” section, update the “Base URL” configuration. Here you will add your primary domain like http://mystore.com/

  • If you have SSL enabled domain, add the https://mystore.com in “Base URLs (Secure)” section.

enter image description here

  • Open the “Default Cookie Settings” section on the same page

  • Set the “Cookie Path” setting to “/”.

enter image description here

  • Save the configuration.

Now select the second store view from store selector dropdown on the top. Perform the above specified steps for second store also.

  1. Share Customer Accounts

If you want to share the customer accounts on different stores, we will have to change one more setting.

  • Go to Stores -> Customers -> Customer Configuration tab.

  • Find the “Account Sharing Options” section.

  • Set the “Share Customer Accounts” setting to “Global”

  • Save the configuration

enter image description here

Server Configuration Next step is to configure our Web server (Apache/Nginx) to enable multistore installation. Lets see how to configure Apache. a. Open the .htaccess at the root of the Magento 2 installation b. On the top of .htaccess file, add following lines:

SetEnvIf Host myfurniturestore.com MAGE_RUN_CODE=store1
SetEnvIf Host myfurniturestore.com MAGE_RUN_TYPE=store
SetEnvIf Host ^myfurniturestore.com MAGE_RUN_CODE=store1
SetEnvIf Host ^myfurniturestore.com MAGE_RUN_TYPE=store

SetEnvIf Host myfashionstore.com MAGE_RUN_CODE=store2
SetEnvIf Host myfashionstore.com MAGE_RUN_TYPE=store
SetEnvIf Host ^myfashionstore.com MAGE_RUN_CODE=store2
SetEnvIf Host ^myfashionstore.com MAGE_RUN_TYPE=store

IMPORTANT:

But remember that Magento 2 can't share the cart and customer session if the different stores are accessed directly. Because Magento needs to see the Session ID to enable cart and customer account sharing. So we need to add the SID parameter to URLs pointing to other stores from our site. It is better to use Magento’s default store switcher for moving between different stores so that cart and customer session can be shared.

More explanation: http://www.webspeaks.in/2016/08/share-cart-magento-2-multistore-website.html

  • Appreciate the effort and time for this. but is there any way that the customer is going to pay shipping costs for both say store1 items and store2 items ? In one order? – LefterisL Apr 12 '17 at 9:20
  • This is for multishiping? You should multishipping option as necessary or implement some logic for that. Isn't better to use multiwarehouse extension for that? Good extension should implement function you need. – Konrad Siamro Apr 12 '17 at 9:29

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.