All popular eCommerce platforms such as Magento, Prestashop in the market provide the ability to build multiple stores from within a single installation, and so does OpenCart. And from my point of view, the multi-store setup in Opencart seems to be more simple than other ecommerce frameworks. In this tutorial, you’re going to learn how to create a multi-store setup using a single installation of OpenCart.
What Is Multi-Store?
First, we need to understand what multi-store is and why you need it?. Let’s consider the case study:
You have a nice-looking online store built from OpenCart. And you’re happy with it as it’s rolling on and you’re making sales. Now, you’re planning to set up more products, but you realize that it would be too much to include everything in the same store.
Normally, you will think of a solution to set up different subdomains for each major category. For example:
electronics.mystore.com – sells all the products related to electronics
books.mystore.com – represents your online book store
This kind of setup is certainly beneficial and works properly. You can make different look and feel for each subdomain according to the type of product it represents.
The implementation for the solution is mostly like you would copy and duplicate the OpenCart installation for every subdomain and do the same for the database as well. So as you can see, every time you want to set up a new subdomain store, you need to duplicate the code and database. The steps are easy but you will see a lot of difficulties to manage all the subdomain sites like:
Opencart upgrade: you need to do the same for every subdomain and we know the upgrade is quite risky, issues happen all the time.
Third-party extensions: you need to manage that in all subdomains.
Now multi-store feature will help you solve all. This feature allows you to set up multiple stores using a single installation of OpenCart. You can set up as many stores you would like in just a single Opencart installation. Follow our steps below to create a multi-store in one Opencart installation.
Steps to create multi-store in single Opencart installation
Step 1 – Set Up the New Subdomain
Before set up a new store in the OpenCart, we need to set up new subdomain or domain pointing to the same default OpenCart installation. You can do that using the control panel of your hosting provider. We won’t go into the details of creating a new subdomain, as this is something outside the scope of this tutorial and if you’re not familiar with that, there are a lot of guides on the internet.
To help you have a visual understand about the process, let’s consider our main default Opencart installation is http://mystore.com and new store is http://electronics.mystore.com. We assume that http://electronics.mystore.com is also pointing to the same document root as that of the http://mystore.com.
Step 2 – Create a New Store From the Back-End
Access your Opencart back-end, go to System > Settings and it will list all the stores available in OpenCart. In most cases, it’ll be a just a single entry for your default and the only store. Click on the Insert button to create a new store.
In the new store creation interface, there are different tabs available. Lets check one by one.
The most important setting in this tab is Store URL. This should be set to the new subdomain/domain of your store. In our case, it would be http://electronics.mystore.com/. The other setting, SSL URL, is useful if you want to provide secure checkout in the front-end and also want to secure your back-end dashboard.
Other important settings in this tab are Template and Default Layout. You can specify a different theme for your new store using the Template setting. And you can set up the default layout of the cart using the Default Layout setting.
Under this tab, you can find settings related to localization. You can set the country, state and language for your store. Another important setting is Currency, which is used to set the specific currency a user would be prompted with during checkout in this store.
This tab allows you to set front-end-related parameters.
Under this tab, you can upload a Store Logo and Icon. Also you can set the dimensions for the different versions of the images used in the front-end.
The toggle setting for the SSL is available under this tab if you want to enable this for the checkout and admin dashboards.
So once you’ve filled in all the necessary details, click on the Save button to create the new store.
Manage your Multi-Store
So we’ve just created a new store in the OpenCart back-end. Let’s see what you can do with your new store. In most cases, the reason for creating a new store is to set up a different set of categories and products. The settings OpenCart allows you to set up for your store are:
Now let’s see how to set up store-specific categories and products. Go to the back-end and access Catalog > Categories to bring the list of categories. Click on Insert to create a new category. Under the Data tab, there is a field Stores showing all the available stores in your OpenCart installation. So the category will only be displayed under the assigned stores.
Next let’s see the corresponding setting in the case of products. Go to Catalog > Products to bring up the list of products. Click on Insert to create a new product.
Under the Links tab, there is a field labeled Stores that shows all of the available stores in your OpenCart installation. So as explained earlier, in the case of category, you can select the stores here under which you would like the product to be listed.
Follow the instruction, we can set up a whole set of categories and products for your each store.
We can manage all the stores from any admin interface: http://mystore.com/admin or http://electronics.mystore.com/admin.
Your Multi-store Front-End
We can assign different theme for stores in the Opencart back-end and this helps to design the look and feel of each store completely differently from each other, as they are totally different sites.
The orders and customer accounts created from the front-end are associated with the corresponding store from which they were created. It’ll help you to analyse the sales reporting for each store.
In short, the feature of OpenCart is to help migrate different web shops to a single multi-store-based OpenCart site.
WELL DONE! we hope the tutorial is helpful for you and you can apply to your store. And don’t forget to share your experiences, comments, or queries using the feed below