5 Attachment(s)
How to setup Magento multiple stores
Today I’ll explain how to setup multiple stores with different domains in a single installation of Magento.
Step 1: Add new root category for new store.
Go to Catalog > Manage Categories then click on “Add Root Category” to create new root category for each website. You set it to active and anchor.
Attachment 56
Step 2: Create new website and store
Go to “System–>manage stores” to create new websites, new stores and new store views
Attachment 57
Attachment 58
Attachment 59
Attachment 60
Step 3: Set template for new website
Go to “system–>configuration” then choose the new website in “store select”, afterwards click on “Design” tab.
Step 4: Edit index.php
The most important part is: editing the content of index.php file. Open the file and find the following line at the bottom of file:
Mage::run();
Comment this line and add some new lines:
//Mage::run();
switch($_SERVER['HTTP_HOST']) {
//second website
case 'second_website.com':
case 'www.second_website.com':
Mage::run('second_website_code', 'website');
break;
//another website
case 'another_website.com':
case 'www.another_website.com':
Mage::run('another_website_code', 'website');
break;
//main website
default:
Mage::run();
break;
}
To customize this code to meet your own needs, just replace the domain names with your required domains, the website codes with your own website codes (in this example it’s the second_website_code:)
Mage::run('second_website_code', 'website');
I hope this helps!
Magestore has released Magento Quick Login extension which helps Customers quickly log in by displaying a popup right below top links like Login, My account, etc. Specially, Magestore is offering the special pricing for this extension. Price starts at $29 and will increase $5 each day until reaching the normal price of $49. 1 day left to buy at $29. Buy now to enjoy the best price!