Magento Expert Forum - Improve your Magento experience
-
Junior Member
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.
Step 2: Create new website and store
Go to “System–>manage stores” to create new websites, new stores and new store views
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!
View more threads in the same category:
-
-
Junior Member
Thanks for this detailed explanation this might help so many newbies and readers. There is also one more source for it to set up multi-websites on your Magento store. Please read: http://apptha.com/blog/how-to-set-up...magento-store/
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Bookmarks