10.03.2012 Angelika Siczek
One of the main advantages of Magento is the possibility to turn on Multistore – a few stores on different domains managed from one administrative panel. Depending on the user’s needs the user can configure multisite (many sites), multistore (every site can have many stores) or multiview (each store can have many views).
I order to configure you need to go to System -> Configuration-> Store Management. Next, click “Main Website” and set your own name for it. The name can be chosen by the user and is there to help with identifying the site in the administrative panel later on. There is a possibility to change the name and the view.
After the above-mentioned modifications, we can create a new website – button “Create a new Website”. Analogically we can add our own names to the site, store, and view. Taking into account that Magento displays only the store views its creation is not necessary.
If our aim is creating two stores with url: www.yourdomain.com/store1 and www.yourdomain.com/store2 you need to create two folders with analogical names in the main installation folder and then copy folders .htacces and index.php from the main Magento installation folder. In the folder .htaccess we need to find the line “RewriteBase /” and change it for “RewriteBase /store1” in the first folder and for the second folder we change “RewriteBase/” for “RewriteBase /store2/”. $compilerConfig = ‘../includes/config.php’;in then ext step in both folders we open index.php and change “$compilerConfig = ‘includes/config.php’;” for $compilerConfig = ‘../includes/config.php’;
We also change $mageFilename = ‘app/Mage.php’; for $mageFilename = ‘../app/Mage.php’;
The next step is a modification of Mage::run() function depending on the folder for one of the versions below:
Mage::run(‘store′, ‘website’);Mage::run(‘store′, ‘website’);
Then we move on to the administrative panel System -> Configuration and choose a default configuration for our website store2 and then we modify the parameter Base URL for http://www.yourdomain.com/store1 (that same step in the other case)
After the correct execution of the process, we should have the possibility of using both sites presenting our stores.