Magento News
Magento Multistore Setup in a Nutshell
One of the really cool features of magento is the ability to easily setup a multistore on one installation of magento. If you have never done it before though it can be a little tricky.
Here is very brief guide:
First create the stores. This is all done via the magento administration.
System->Manage Stores
foreach store that you want, create a website, store and store view. Make a note of the codes as you need those in the code below.
Then in your index.php file have some code like this:
-
-
switch($_SERVER[‘HTTP_HOST’]) {
-
-
case ‘first-store.com’:
-
case ‘www.first-store.com’:
-
Mage::run(‘store1′, ‘store1′);
-
break;
-
-
case ‘second-store.com’:
-
case ‘www.second-store.com’:
-
Mage::run(‘store2′, ‘store2′);
-
break;
-
-
-
case ‘third-store.com’:
-
case ‘www.third-store.com’:
-
Mage::run(‘store3′, ‘store3′);
-
break;
-
-
default: //run the default store if for some reason the above hasn’t worked.
-
Mage::run();
-
break;
-
}
Possibly Related Posts:
- Gorilla Commerce Launches "In Store" Line of Magento Software Extensions – San Francisco Chronicle (press release)
- Gorilla Commerce Launches "In Store" Line of Magento Software Extensions
- Magento. How to edit social icons block | Template Monster Help
- Magento, Moodle installation and integration | HTML | MySQL | PHP …
- Take advantage of Magento’s REST API to integrate the business applications – openPR (press release)
RSS Feed