OpenCart Multi-Store setup on localhost


Hi Everyone,

Have you ever used OpenCart script for shopping cart? Its really fantastic I liked it. Anyway if you have ever used it do you know it provides the multi-store functionality (i.e. you can setup multiple store using a single instance).

Now for the first time offcourse many of us (web developers) will try to install it on our local machine rather than server. But how to setup multiple stores on localhost. No idea? okay here we go:

I assume that you have
XAMPP for Windows
XAMPP installation directory is : C:\xampp
OpenCart Store directory: C:\xampp\htdocs\store
and the Main Store URL is: http://localhost/store

1. So first you have to do is edit Apache Configuration File (to create Alias for each store)

Open the Apache configuration file (C:\xampp\apache\conf\extra\httpd-xampp.conf) and find the section that starts with “”, and insert the following lines inside this section:-


Alias /store1 "C:/xampp/htdocs/store/"
Alias /store2 "C:/xampp/htdocs/store/"

Then restart your Apache server from the XAMPP control panel or xampp_restart.exe.

Here you can see 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.

2. OpenCart Configuration
Now Log in to your administration (http://localhost/store/admin) 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/store1/” and the other a Store URL of “http://localhost/store2/”.

That’s it.

You should now be able to access your new stores at “http://localhost/store1” and “http://localhost/store2”, with your main store still at “http://localhost/store”.

Cheers,
Have fun!

Advertisements

5 thoughts on “OpenCart Multi-Store setup on localhost

  1. Pingback: NULL » Blog Archive » OpenCart Create a new store 使用多商店功能

  2. Hello There

    thanks for your nice tips

    Open the Apache configuration file (C:\xampp\apache\conf\extra\httpd-xampp.conf) and find the section that starts with “”, and insert the following lines inside this section:-

    Alias /store1 “C:/xampp/htdocs/store/”
    Alias /store2 “C:/xampp/htdocs/store/”

    in that we have to all the time insert that code in that file is it possible without insert that code or add that code dynamically when ever store will be created

    Thanks
    Amrish

  3. I’ve been exploring for a little for any high-quality articles or blog posts in this kind of area . Exploring in Yahoo I at last stumbled upon this website. Studying this info So i’m happy to convey that I have an incredibly excellent uncanny feeling I came upon exactly what I needed. I so much indisputably will make sure to don?t forget this web site and give it a glance on a continuing basis.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s