Video: Creating Multiple Online Storefronts (Part 1)
In this video we showcase one of the more powerful Magento features, the ability to manage multiple Online storefronts from a single administration panel. This functionality allows an online merchant to centrally manage all facets of a business from one location, while selling through multiple online stores.
The first video goes through the basics of creating a completely separate website within the Magento installation, to be controlled from the same admin. Below are the necessary steps to do this, carried out and recorded on the 0.9.17740 version of Magento:
- Step 1: Creating a new folder for second website, copying index.php and .htaccess, necessary change of code to index.php
- Step 2: Creating a new root category for the second website
- Step 3: Creating the website in the admin, along with a store and store view
- Step 4: Configuring the URL structure of the new site
- Step 5: Adding categories and products
- Step 6: Associating products with the new website
At the end of the video, the logo of the new website is updated and the homepage is set to a different admin-created CMS page.
Please note: This demonstration uses example.com and some symlinks to make the URLs more readable. You may notice the url of the second website switching between http://www.example.com/magento/mainstore/shoestore and http://www.example.com/magento/shoestore - this is why. In a live environment each site will most likely have its own IP, so different domain names could be configured accordingly.
This is Part 1 of 2 videos showing Multiple Websites/Stores. Part 2 will go into more detail about store views and multiple stores under the same website.


1dell |posted March 20 2008
Impressive and needed, since it’s a major change from previous method. When can we expect the 2nd video on administering multiple stores within the same website to be available?
2johannes |posted March 20 2008
Dell - the 2nd video should be up there by the end of the day on Friday.
3nafnaf1000 |posted March 20 2008
when i change the store THEM from “default” i get this error…
any idea?
exception ‘Mage_Core_Exception’ with message ‘Invalid store requested: “default”.’ in /home/hbaetcco/domains/hbaetc.com/public_html/magento/app/Mage.php:377
Stack trace:
#0 /home/hbaetcco/domains/hbaetc.com/public_html/magento/app/code/core/Mage/Core/Model/App.php(527): Mage::throwException(’Invalid store r...’)
#1 /home/hbaetcco/domains/hbaetc.com/public_html/magento/app/code/core/Mage/Core/Model/Url/Rewrite.php(139): Mage_Core_Model_App->getStore()
#2 /home/hbaetcco/domains/hbaetc.com/public_html/magento/app/code/core/Mage/Core/Controller/Varien/Front.php(109): Mage_Core_Model_Url_Rewrite->rewrite()
#3 /home/hbaetcco/domains/hbaetc.com/public_html/magento/app/code/core/Mage/Core/Model/App.php(440): Mage_Core_Controller_Varien_Front->init()
#4 /home/hbaetcco/domains/hbaetc.com/public_html/magento/app/code/core/Mage/Core/Model/App.php(721): Mage_Core_Model_App->_initFrontController()
#5 /home/hbaetcco/domains/hbaetc.com/public_html/magento/app/Mage.php(421): Mage_Core_Model_App->getFrontController()
#6 /home/hbaetcco/domains/hbaetc.com/public_html/magento/index.php(29): Mage::run(’default’)
#7 {main}
4adimagento from Los Angeles, CA|posted March 20 2008
@nafnaf1000 - the blog comments are not the place for technical questions and pasting code. Please use the forum in the future.
5magentocommerce |posted March 21 2008
Will this bulk stores share customers informations?
I think there have two kinds mult stores. One is same domain another is use several domains.How control several domains in one admin?
there have another interesting confunction,Like ioffer.com allow customers sell their goods on your store.If this kind confunction possible?
6johannes |posted March 21 2008
To set up multiple domains you would follow the same steps as are in the video above. I just didn’t have multiple domains at my disposal when making the video
If you wanted for example “shoestore.com” you would redirect this domain to the “shoestore” directory that we created in the video.
Customer accounts can be shared globally, or per website. You can configure this from System -> Configuration -> Customers Configuration -> Account Sharing Options.
7agcilantro |posted March 21 2008
Thanks for the video.
Do the additional directories for the additional stores have to be anywhere specific, i.e., inside the Magento folder or directory where the main site was installed on the server?
Also, is it possible to have different pricing on each of the different stores, for instance a wholesale store, a retail store and a consumer store?
8radders |posted March 29 2008
As far as I can tell it is not possible to set pricing at the store level as this is showing up as global. You can of course have different pricing for different customer groups so you could have a wholesale customer group across all stores. From what I read (haven’t tried it yet) it is possible to set different pricing and delivery methods at the website level so this would seem to be the answer for setting up a wholesale store.
9radders |posted March 29 2008
Correction to my earlier post - discovered this post:
Prices scope can be changed in configuration. Please go to admin -> System -> Configuration -> General -> Price -> Scope
10nate_02631 |posted April 1 2008
Forgive the ignorant question (?) and I think I may know the answer based on what I read/saw, but could a web dev potentially have a single install of Magento and then set it multiple stores for clients based off that one install.
From what I’ve seen it is possible to
a. have different stores at different domains, with different looks
b. have different products/price sets for each of the stores
But could the stores basically be isolated, with permissions, etc… so that a store owner could maintain their store in complete isolation from the others (i.e. no sharing of attributes, customer info etc...)? Would they run of the same database?
11johannes |posted April 1 2008
@nate_02631: Multiple websites under one magento installation will still share one admin panel - meaning, orders from all websites will show up in the ‘sales’ module… all customers will show up under ‘customers’. And yes, as far as I know they will run off the same database.
To best accomplish what you describe, I would think multiple Magento installations are required. The separation of data between websites is to keep track of front-end activity - if you run a lingerie store and a gun store you might not want customers accounts and order information to be shared between them
12quark from Romania|posted April 20 2008
1. I want to know if a client can have one chart and one checkout for all stores within one website or he must checkout from each store.
2. What about different stores on different websites? One chart and one checkout or multiple charts and checkouts from each websites?
13stretchr from Georgia, USA|posted May 2 2008
In the video, for the step where you change the index.php from:
umask(0);
Mage::run(’default’);
to:
umask(0);
Mage::run(’shoestore’,’website’’);
In my “index.php” the code is:
umask(0);
Mage::run();
(Note no ‘default’)
Would I follow the same editing step, even though there was no “default” in there initially?
Thanks,
Stretchr
14stretchr from Georgia, USA|posted May 2 2008
Oops. Sorry. Will ask in the forums.
Stretchr
15freshwebservices from Leicestershire, UK|posted May 28 2008
Sorry for such newbie questions ... but here goes. Will Magento cope with the following scenario
1) Multiple stores on the same server with unique urls - main store = shop1.com, other stores = shop2.com, shop3.com, etc. - each one being a separate folder off the root directory.
2) Each shop shares 1 shopping cart/checkout - ie, if I buy from shop2.com then the sale details will be available to admin of the main store shop1.com but the customer will get invoice from shop2.com not shop1.com, etc?
3) In this scenario, would one SSL certificate suffice for all the shops or will I need one for each separate domain (ie, shop1.com, shop2.com, etc).
4) Similarly, will each domain require its own IP address?
5) How many different sites can Magento run without performance problems? My client has c.100 separate sites that he wants to manage from a central admin & single shopping cart site ala Magento.
Thanks in advance for your time & help,
Eddie
16DaveAllen |posted June 3 2008
The questions that “freshwebservices” asked are almost exactly the same as I was going to ask here so I also look for these answers!
Anyone?
17rapado from 85354 Erding / Bavarian / Germany|posted June 30 2008
Hi @johannes,
your videos are great but I didn’t understand how to setup multiple stores on multiple different URL.
When you don’t have multiple different URL to your disposal, could you describe the way in a text description ?
Thanks
rapado
18thE_iNviNciblE from Oldenburg|posted July 16 2008
hello,
again a quite nice magento screencast
go on boys n girls
@rapado:
does it matter which URL it is ?
you can chosse the same domain with a subfolder…
19magento-neil |posted August 7 2008
In this scenario, does each store get its own checkout?
20wildwisconsin |posted September 4 2008
This seems to not work when “batch” adding products to the new store front.
I already have XXXX products in the system already and don’t want to go thru each of the individually to enable them to the new site. So from MANAGE PRODUCTS I select everything, and Update Attributes to enable them into the new store, but they don’t show up until I open each product up manually and add the new website again and choose the “Copy Data from: Default Values” selection.
Is there a way to do this by batching? or did I do it wrong?
21wildwisconsin |posted September 4 2008
It seems to me that it would work if “Copy Data from: Default Values” would show up when selecting the website on a batch attribute upload from the Manage Products.
22edg1 |posted October 2 2008
Please explain how to set the different url’s for different websites!
I’ve tryed to redirect it but then you go the the other url/directory
is there a way to keep it in the initial different url.
???
Please help out!
kind regards,
edg1
23Winkelman |posted October 12 2008
Really impressive, great possibilities for webshop owners. But we need to study and learn.
Best Regards
24edg1 |posted October 13 2008
OK i’ve found it!
When you want to add different urls its quit easy you just have to change the link url into the url you want and then add addon in your mail shop setup-url.
in this folder you add a new index file changed it to point to the new website.
and that should work fine!
25thE_iNviNciblE from Oldenburg|posted October 13 2008
thats it…
maybe a problem with “open base dir restriction” happens… but this could be fixed with manual editing of the apache conf....
it’s quite simple to change the complette store-url ... or do subdomains and so on ...
thumbs up
26Thejosh13 |posted November 8 2008
"I just didn’t have multiple domains at my disposal when making the video”
you gotta be kidding me
27Steve J |posted January 24 2009
I’m new to all of this. I’ve looked for several hours at the features of magento because I want to replace an existing site. My mall site is for small mom and pop type store owners who either don’t know how to set up an online store or cannot afford to. I do not want to get directly involved with their transactions but only supply them with an inexpensive way to be on the internet. The features I am looking for: Multiple storefronts for independant merchants, separate cart for each storefront with independant merchant accounts. Everything that I have seen looks great, just not an everyday web site builder and could not tell if this is how the script is set up.
Thanks, Steve in cold Ohio
28freshwebservices from Leicestershire, UK|posted January 24 2009
Hi Steve,
I don’t think Mage multiple stores is what you are looking for - it doesn’t mean that you can manage multiple, completely separate websites, each one linked to a separate client, each with a separate login, separate customer database, etc, etc from the one install of Mage.
Rather, multiple stores refers to the ability of a web store owner to set up ostensibly separate websites - say, one store for brand X clothers, another for brand Y clothes etc, but sharing a common checkout, customer database, etc. Have a look at Gap.com for an idea of the concept.
At least, that’s how I’ve understood it!
Eddie
29Steve J |posted January 24 2009
Thanks Eddie, The script I have been looking at is iBotique by NetArt media (netartmedia.net). It uses one primary database but individule php index script files for each vendor to operate the individule stores. Everything is controlled by a main administrator with limited administrator control for each vendor to maintain their stores. It’s an all right script, more than I wanted to pay and it lacks many of the features in magento. I was just hoping to have more control over the front end look and operation of the script. I appreciate your imput.
Thanks again....Steve
30CalinT |posted February 5 2009
First define your websites and stores under System -> Manage Stores and then, provided you already parked your second domain (http://www.seconddomain.com) on top of the main domain (http://www.maindomain.com):
you will have something like:
WebsiteName WebsiteCode
-------------------------------------------
website1 web1code
website2 web2code
// web1code is usually ‘base’
Then edit System -> Configuration -> website1 -> Web tab and :
set {Base URL} to your http://www.maindomain.com/
set {Base Link URL} to your http://www.maindomain.com/
Then edit System -> Configuration -> website2 -> Web tab and :
set {Base URL} to your http://www.maindomain.com/
set {Base Link URL} to your http://www.seconddomain.com/
Then edit index.php under the root folder of you maindomain and change:
Mage::run(’base’, ‘website’);
to:
switch ($_SERVER[’HTTP_HOST’]){
case “www.seconddomain.com”:
case “seconddomain.com”;
Mage::run(’web2code’, ‘website’);
// where web2code is the code of your second website from under manage Stores -> Edit Website
break;
default:
Mage::run(’web1code’, ‘website’);
}
That’s it! No add-on domains required. I have successfully handled this way 3 secondary domains (parked on top of the main domain) each featuring slightly different product catalog.
P.S. The only thing I don’t like about this set up is the img href’s, css href’s and so on point to maindomain.com for all secondary websites
Good luck.
31Kim S |posted March 8 2009
@CalinT This is amazing. Works like a charm. Infact I have domain.com, subdomain1.domain.com and subdomain2.domain.com setup and it works correctly.
I havent tinkered with CSS etc ... just wanted to try the subdomains instead of primary domains. Thanks for the help.
32MagentoSepcialist |posted April 10 2009
HI every body I have a question .
I have set up Multi Domain Website and its working fine but my question is as follows
I register as a user on Domain A
I want to use the same details of Domain A to Log into Domain B but it refuse and say user not found where as both the domain A and B are running on behind same Magento Application .
Can Any one Guide me how to make this possible that is User of Domain A logins to Domain B with the same details
Regards
33lakanat |posted April 21 2009
quelqu’un a t’il une reelle information complete a fournir pour installer un multiwebsite multidomaine avec magento ?
34lakanat |posted April 21 2009
Hi,
anybody have a really and runing solution to install multi website ?
LK
35Hugoto |posted June 8 2009
the video is so outdated so I can’t even reproduce the steps…
pls how to do this with the actual version of magento?
36Cyber Coder |posted June 8 2009
Hello Hugoto
I can set up your multi store and guide you contact me
Regards
Shehz
37Phillip Smith from Toronto, ON., Canada|posted June 25 2009
Found this relatively recent documentation on multiple storefronts here:
http://www.magentocommerce.com/wiki/how-to/how_to_automatically_redirect_to_a_store_view_based_on_the_browser_language
38Phillip Smith from Toronto, ON., Canada|posted June 25 2009
Actually, sorry, here’s a better link:
http://www.magentocommerce.com/wiki/general/multiple-website-setup
39CalinT |posted June 25 2009
@Kim S - Thank you for your apreciation. I’m delighted to see that my post helped somebody.
Although I think my post is self explanatory I welcome an questions. Just post the question under this thread and I’ll do my best to answer it.
40CalinT |posted June 26 2009
@MagentoSepcialist
Although I don’t see a reason for loggin in to multiple domains , you may try to play with mySQL table “customer_entity” and duplicate the records while changing the website ID field. Not sure it wors, but it should.
Not an “up front” solution though, I realize that.
41dhamsi |posted August 7 2009
how i can see two domains in localhost which share the same database
42johnashleys |posted September 9 2009
Please explain how to set the different url’s for different websites!
I’ve tryed to redirect it but then you go the the other url/directory
is there a way to keep it in the initial different url???
download movie free
43thE_iNviNciblE from Oldenburg|posted September 17 2009
--> http://www.magentocommerce.com/bug-tracking/issue?issue=3444 => 2008-09-26 11:49:11 -> nearly 1 year later.... the spam bots are learning about magento submit forms…
44aneguitar from Greece|posted September 28 2009
Do I also need to create, in the index.php file, symbolic links to point to a few directories??
o ln -s ../magento/404 ./404
o ln -s ../magento/app ./app
o ln -s ../magento/includes ./includes
o ln -s ../magento/js ./js
o ln -s ../magento/media ./media
o ln -s ../magento/skin ./skin
o ln -s ../magento/report ./report
o ln -s ../magento/var ./var
o ln –s ../magento/lib ./lib
I am asking this because at the fooman Speedster extension it says that I have to.
But when I put these symbolic links in the file then the site stops working and it gives me an error:
(Parse error: syntax error, unexpected ‘/’ )
This is in the installation guide at the Fooman Extension:
http://www.magentocommerce.com/extension/reviews/module/457/p/14/
Thank you very much!
45PescaraZanni |posted September 28 2009
but this video is a fake… it doesn’t work with last magento version
46freshwebservices from Leicestershire, UK|posted September 29 2009
That’s a bit harsh!
47Martinlee |posted October 6 2009
thanks alot for sharing.
Researchpaper| Online Research Paper| Buy Research Paper|
48micksay from Canterbury|posted October 15 2009
Hi All - I hope you are all well.
Magento really rocks, well done guys and gals. However.....
I think I must be a bit thick as a I cannot get my head round this.
I have:
Website. 2 stores. 2 store views.
website = http://www.hair-skin-sun.com
Store 1. on blue theme with product and customer database etc.
Store 2. I want to create a consulting section with modern theme. I have set up the skeleton store & theme.
Now. I own another domain called http://www.salon-advice.co.uk and I would like my “store 2” to be reachable when some one types http://www.salon-advice.co.uk into a browser. And to all intents and purposes the site visitor will be in http://www.salon-advice.co.uk and this will be reflected in the address bar.
Also if I am doing a mail out I would like to direct prospects to either:
http://www.hair-skin-sun.com/landing-page-x.html or http://www.salon-advice.co.uk/landing-page-y.html
Now I have a headache…
Can some one please help me (in thick bloke terms) how to do this please??
Thanks a million
Mick
Store 2 =
49micksay from Canterbury|posted October 15 2009
PS::::: I Aim to abandon the origonal www salon-advice .co.uk and rebuild this site inside my Maganto store as store 2…
Ta
Mick