Opencart multi store configuration

Multi-Store on Localhost

Objective
Create 2 “sub” stores of your main store, called “store_1” and “store_2”.

Assumptions
XAMPP for Windows
XAMPP installation directory: C:\xampp
OpenCart Store directory: C:\xampp\htdocs\store
Main Store URL: http://localhost/store

Edit Apache Configuration File
What we are going to do is create an “alias” for each store.
Open the Apache configuration file (C:\xampp\apache\conf\httpd.conf) and find the section that starts with “<IfModule alias_module>”, and insert the following inside this section:-

Code: Select all
Alias /store_1 "C:/xampp/htdocs/store"
Alias /store_2 "C:/xampp/htdocs/store"

Then restart your Apache server from the XAMPP control panel.

There are 2 things you should note about the above alias entries:
(1) Forward slashes are used for directory paths in the Apache configuration file, NOT backslashes as would normally be used in Windows.
(2) Both aliases point to the same directory – your main store’s directory. This would be the same for any other “sub” store you may wish to create.

OpenCart Configuration
Log in to your administration and from the menu, select “System->Settings” and create 2 new stores. You can call them whatever you want.
Give one a Store URL of “http://localhost/store_1/&#8221; and the other a Store URL of “http://localhost/store_2/&#8221;.

You should now be able to access your new stores at “http://localhost/store_1&#8221; and “http://localhost/store_2&#8221;, with your main store still at “http://localhost/store&#8221;.