Opencart – Use different modules on multiple stores
If you have multiple stores on one Opencart installation, it’s quite likely you might want to display different versions of the same module on your different stores. I first came across this issue when developing a mobile theme, designed to be used alongside a ‘standard’ theme suitable for desktops. While most modules transfer fairly easily across from one theme to another, one that doesn’t is Banner, and Slideshow is much the same. On my standard site I want a nice wide banner to take up the whole width of the home page, but if this is transferred directly to the mobile theme, designed to have an entirely fluid width to fit a screen down to 320px wide, it won’t fit. This could perhaps be overcome with css, but the Slideshow module creates an inline style setting the width, which on the face of it appears insuperable…
The good news is that this is easily addressed using Opencart’s Layout functionality. A Layout is the entity which links Modules to pages and stores. When a page is to be displayed on a store, Opencart looks up the layout appropriate to that page on that store, and then finds any modules configured for that layout. Let’s use the Slideshow example to show how we can use two different slideshows on the homepages for our default and mobile stores. The first thing to do is to create a new layout for the mobile store home page. First we create the new Layout, via System > Design > Layouts, and click the ‘Insert’ button. I’ll call the new layout Home_Mobile. Now I need to tell Opencart which pages (or routes) on which store this Layout should be used for. Click ‘Add Route’, select the mobile store from the dropdown and then, to use this on the homepage, add the route ‘common/home’. Like this:

Click ‘Save’. Now we’ve done this, assuming no other changes have been made, Opencart will use the Layout Home for the home page on the default store – this is set up already, but for the mobile store it will use the Layout Home_Mobile.
Once we’ve done this the next bit’s easy…. Let’s assume we’ve got a suitably sized Banner already created. Bring up the Slideshow module config screen (Extensions > Modules > Slideshow – Edit), then click ‘Add Module’, and fill in the details for your new Slideshow, selecting ‘Home_Mobile’ as the Layout to which this module is applied. Something like:

Click ‘Save’ and it’s done – you have two separately sized Slideshows visible on the two different homepages.
Tags: opencart
Impossible to tell without seeing your setup in detail, but my first thought would be to try the default theme and see if the problem persists.
Dear Simon
I m trying to set a multistore but I have a problem with modules. I use Jurnal theme and I want both of my sites to have the same modules. I created new layout with (common/home) but only some modules (slider -popup- and banners) appears in my second store…..
Castom sections module and carousel I can’t appear in my second layout……..
Any advise is welcome…
Best regards
John
Don’t do a complete install, have a look here to do what you’re describing.
Thank for your valuable post
but my issue is diffrent
I want to create my mobile site using seprate subdomain( fresh opencart installtion on subdomain) using all new files not using multi store but want to combined all databases for main domain and subdomain how it possible
Awsome!!! I have been looking for this from so much time.. Thanks a lot!!!!
As I’ve replied to you before, there is no search in the mobile template. Feel free to add one yourself. Similarly, I have not styled sub categories differently than categories. Again feel free to make whatever amendments you need.
I’m already using your template in my site. Everything is fine except two major lackness. First one is no search box and the second one is when i display the subcategory, the main and sub categories looks like same. People get confused that which one main and which one sub. There is no any subcategory page as like the mobile site of flipkart.com . Please solve these problems.
This page tells you how to do this, as far as I can understand your question. Are you trying to do something different that what’s described here?
I have a default website & a multistore’s vendor website for vendor…
i want to display different modules on my default website…and different modules on vendors website…
please help me how to do this…
i have already configured a theme on default website…
You’d just create a different layout to use on the store, and create a different banner to assign to the slideshow using that layout.
Excellent article now I understand the layout section. What happens if i want to add different images to each separate slideshow for each domain. this just enables you to change the size and position.
Thanks a lot for this explanation it worked perfectly!
It’s working perfectly for my multi-store site.Thanks..
If your different stores are using different themes, just paste the GA code in the header.tpl file for each theme, and remove it from the Store > Settings. If you’re using the same theme, either create a new theme to accommodate the code, or if you fancy being a bit more technical, write some conditional code into your template file which echoes different GA code depending on the store. You can retrieve the store id using:
I would like to know how am i going to put all the GA tracking code if im using multistore? only the default setting has the google analytic textbox.
You should be able to do this by defining two additional Layouts for your second and third stores, and setting up the Slideshow Module for each store using the different Layouts.
Hello Sir
here follow you point but not display different slidshow for three store
Dave, I know you got this fixed. For others, the approach here is to use a different layout as described above.
Hi
How can i add different routes do i dont get the same banners and mods on both sites
can u use something different than common/home
thanks to provide this type of nice tutorial. it’s working for me
A single installation of Opencart will allow you to create multiple stores, with different styling and with different products if required. This article describes the setup. Is that what you mean?
Hello,
Thank you for your answer, but I would like to know how to have a one cart for multistore(one cart for all stores).
All the best!
Not familiar with the Visitors module. You’re probably best taking this up with the extension developer.
Having said that, using Google Analytics or similar would probably be easier and give you better stats.
Hy, I have a problem with my visitors module.
How to generate independent counter on every store from my multistore?
And what have to do for multistore same cart?
All the best!