Latest Articles
So far this was never an issue, there were problems with uploading modules via the installer because of the ftp connection but you could allways install ocmods without any issue. However, some .. Read More
People had this issue so many times I thought I would write a bit about it. The  types of issues with opencart's 2.x modification system that I identified so far are: 1. Old Vqmod .. Read More
This small tutorial will show you how to manually add custom links to the default top menu in opencart. If you dont want to go trough all the hustle and would like to be able to completly customize.. Read More
To enable seo urls in opencart navigate in admin to system > settings , edit the store and on the server tab of the store settings you will find "Use SEO urls", set it to yes. So far e.. Read More
All Articles

Set up Layouts on Multi-Store - for opencart 1.5.x

Set up Layouts on Multi-Store - for opencart 1.5.x

Many people are confused about layouts and specially how to set them up when they are using multi-store.

A layout reffers to a page or a group of pages in your opencart store, for which you can controll the display of your opencart modules.

Layouts can be added and edited in your opencart admin by navigating to system > design > layouts.

The pages that belong to a layout are controlled by routes per store. Example: The 'Home' layout has the route 'common/home' added for the default store.(this home layout exists by default, since you installed/upgraded opencart).The only page that has the route 'common/home' is obviously the homepage, meaning that whatever modules you add to the home layout will only display on homepage of the default store. Another example of a preseted layout is the 'Account' which has the route 'account' for the default store, which as you notice is a one word route(which is actually the first part of more routes like: account/login > for login page, account/register > for the register page, account/account > for the actual account page). In this case the account layout applies to a group of pages, because as explained, more pages have the account route, which means that whatever modules you added to the account layout will display on login page, register page, accoun page, newsletter pages and others > all on the default store.

As mentioned above, all the presetted layouts have routes added for the default store. So if you allready added a new store, the system wont automaticaly set the layouts for it, you have to do it.

You have 2 choices when it comes to setting layouts for multistore, edit the existing layouts and add new route for the new store or create new layouts for the new store.

If you want your new store, to display on its layouts the same modules as the default store does, you need to edit all presetted layouts from in system > design > layouts , and on each layout edit store, click on add route. At store select the new store you added and at route, insert the same route as above is for default store. Example: After you did the mentioned edit for the home layout, if you were to add the module featured to the home layout, the featured module would appear on the both stores on the homepage in the exact same position(of course, each featured module, would only display the products that are assigned to the store it displays on).

If you want your new store to look different that the default one, to have a different configuration for modules than the default one, then you would have to create new layouts for it. Basically , you would duplicate all the existing layouts, only that you would modifies their name (Ex: Home would become Home-Store2 - so you can diferentiate the laayouts per store when you edit the module) and add the same routes as the default ones, only that in the store selector you would select the new store. Why do this? Because in the default store you would be able to set the featured module to homepage while in the new store , you could set only the latest module to homepage. This of course would apply for all modules and all positions.

Posted by Flo

11 Comments To "Set up Layouts on Multi-Store - for opencart 1.5.x"

Tara On 27 Jul 2015
Thanks, I have created multistore and this article helped me with settings of styles for new store. Reply to this comment
Flo On 20 Sep 2013
You can have custom headers by havingcustom themes for each store. Reply to this comment
Nik On 20 Sep 2013
How to create a custom header for each store? Thank you! Reply to this comment
Adrian On 30 Apr 2013
Foarte bun tutorialul, chiar m-a ajutat mult. Acum ma lupt cu un modul de vizitatori caruia nu-i dau de cap ca fiecare magazin sa-mi arate vizitatori propriu. Acum imi arata aceeasi cifra peste tot. Cum as putea face ca sa am cosul acelasi in toate magazinele, sa nu ma loghez iar daca am trecut in alt magazin? Cu stima! Reply to this comment
Sgh77 On 21 Nov 2012
Be great if you did a youtube clip to show this... Its all quite mind numbing Reply to this comment
Flo On 11 Nov 2012
That has nothing to do with the layouts system. For that you would need to edit the extension's files. Reply to this comment
Ali On 11 Nov 2012
This is really nice information. How can I setup different PayPal information for new/2nd store. Reply to this comment
Flo On 13 Oct 2012
You dont need a plugin, opencart allready has the multistore system. Reply to this comment
Ariella On 13 Oct 2012
Im looking for a OpenCart has multi-store plugin for 1.5 x? Do you have any ? Reply to this comment
ariella On 13 Oct 2012
OpenCart has multi-store for 1.5 x version? I need a plugin for my store to allow multi stores. Please email me Reply to this comment

Write a comment

Your Name:

Enter the code in the box below:

Your Comment:
Note: HTML is not translated!