Need help buying now? +358 9-424-505-31 +1 888-886-76-81
My Cart

Your Cart is Empty

Need help buying now?
+358 9-424-505-31 +1 888-886-76-81

Magento Installations: Why Build Multiple Stores?

Magento Installations

Magento ® is a very smart eCommerce platform. It is installed only in a particular order configured in the settings and it is installed with a special algorithm. We suggest considering how to do the installation of Magento ® for several stores, what you need for it and what the advantages of this method are.

Why is it an advantage to have several stores in Magento Installations?

If you have the majority of your platforms, which are filled in with the products regularly, you need to control their work, condition, add customers, etc. You spend much time on checking different platforms and the creation of several stores on the same Installation of Magento ® is formed firstly for the administrator’s comfort (owner’s comfort) and content manager’s comfort.

Some Moments

You should be informed that this action can be done if only you have some work experience in Magento ®. Also, you should have at least one store. If you have everything like this, you should do some procedures or contact specialists in order to do them. For instance, you can contact GoMage company or other experts in Magento ®.

How you can add a store in Magento ®

Website - this is the site which will be connected to your store;
Store – this is the store which will be created on the site platform;
Store View – respectively, it is a copy of the store (usually it is used for the internationalization).

First of all, you should indicate where this store will be located. You should go to the admin panel and create new directories on the path System - Manage Stores. There you will find your store folders, Store View and Website created. Let’s investigate it properly:

Website:
The title is Shoes
The label is shoes

Store:
The title is Main Store
You should choose the label from the list called Website Shoes
Now you should go to the Root Category in the drop-down menu and choose a new root directory which has been created above.

Store View:
You should go to the Main store from the Store section.
The title is English (you can name it as you want)
The label is shoes_en
You should set the status up as Enabled

The other stores which need to be created on the same Installation of Magento ® should be written the same way.

Then you should indicate new URL addresses for the created store. You need to go to the admin panel: System – Configuration. You will find the Configuration Scope in the upper corner and you need to change Default Config to the label of the Website directory. In our case, it is “shoes”. Now you should indicate the path to Base URL in the sections called Web, Secure and Unsecure.

Remember that you need to indicate a new address for every section, otherwise Magento ® will redirect your customers to the same pages and it will influence the customers’ trust and attitude to the store. Also, you should check whether the end of every URL has the necessary closing sign “/” In order to make all the written addresses active you need to do the following:

The store in Magento ® should be located in the subdirectory to which the path (URL) indicates. This directory is located in the root folder of a site on Magento ®. It is the most widespread action, but not necessary.

In order to upload all the files, you should use the FTP connection, create a folder in the root section. It will be the shoe folder in our case. Some files from the root should be copied to this folder: index.php and htaccess. As soon as you do it, you need to save changes and open the file idex.php for editing. You will find the line $mageFilename = 'app/Mage.php' there. Our task is to change the path to the correct one, in other words, to write all the folders completely. Also, you need to write two additional parameters - Mage::run(). After the editions the code should have the following view: Mage::run('shoes', 'website').

Domain Names

Of course, your stores should have different names, in other words, you need to change the domains. You need to write the following information for each of them in the already fixed index.php file:

Instead of Mage::run();
switch($_SERVER['HTTP_HOST']) {
       	case 'shoes.com':
       	case 'www.shoes.com':
       	Mage::run('shoes', 'website');
       	break;
       	default:
       	Mage::run();
       	break;
}

 

If there are a big number of stores you should change the code in the following way:

switch($_SERVER['HTTP_HOST']) {
       	// the domain address
       	case 'the domain address ':
       	case 'the domain address ':
       	Mage::run('shoes', 'website');
       	break;
       	
       	// the domain address2
       	case 'the domain address2':
       	case  'the domain address2’:
       	Mage::run('hats', 'website');
       	break;
       	
       	// the domain address3(default store)
       	default:
       	Mage::run();
       	break;
}

 

After this action, the created store will be accessible with a new address.

There is another way to update the settings quickly. You need to go to the file httpd.conf. You can find it in the path /var/www in the folder http. Then you should open it using the code editor:

<VirtualHost *:80>
	ServerAdmin webmaster@domain1.com
	DocumentRoot /var/www/http
	ServerName domain 1
</VirtualHost>
<VirtualHost *:80>
	ServerAdmin webmaster@domain2.com
	DocumentRoot /var/www/http
	ServerName domain 2
</VirtualHost>
<VirtualHost *:80>
	ServerAdmin webmaster@domain3.com
	DocumentRoot /var/www/http
	ServerName domain 3
</VirtualHost>

 

Then edit the file .htaccess, which can be found on the path at /var/www/http/.htaccess

SetEnvIf Host www\. domain 1\.com MAGE_RUN_CODE= domain 1_com
SetEnvIf Host www\. domain 1\.com MAGE_RUN_TYPE=website
SetEnvIf Host ^ domain 1\.com MAGE_RUN_CODE= domain 1_com
SetEnvIf Host ^ domain 1\.com MAGE_RUN_TYPE=website
SetEnvIf Host www\. domain 2\.com MAGE_RUN_CODE= domain 2_com
SetEnvIf Host www\. domain 2\.com MAGE_RUN_TYPE=website
SetEnvIf Host ^ domain 2\.com MAGE_RUN_CODE= domain 2_com
SetEnvIf Host ^ domain 2\.com MAGE_RUN_TYPE=website
SetEnvIf Host www\. domain 3\.com MAGE_RUN_CODE= domain 3_com
SetEnvIf Host www\. domain 3\.com MAGE_RUN_TYPE=website
SetEnvIf Host ^ domain 3\.com MAGE_RUN_CODE= domain 3_com
SetEnvIf Host ^ domain 3\.com MAGE_RUN_TYPE=website  
  

 

The code has been taken from the site www.magentocommerce.com

Extensions for stores on Magento ®

Now consider the extensions for every store on Magento ®. Many owners of stores on Magento ® are afraid of creating several stores on the same Installation of Magento ® because they think that every additional extension will demand a separate license for each of these Magento ® stores. For instance, GoMage company provides you with the opportunity to buy the extension license and if you have several stores on the same Installation of Magento ®, you need only to buy the extra domains option. This option will activate the extension for several stores that are on the same Installation. So, you see that some extensions of Magento ® have the opportunity to be activated for several sites on the same Installation.

It is easy to do during the activation process. The license sees the quantity of your Magento ® stores and allows you to tick the appropriate checkboxes that are opposite to the necessary sites.

If you have any questions as to this option, you can contact our GoMage specialists and we will answer you as soon as possible.