Now i want to choose if a module shows up or not.
(for example the newsletter module should show up in store1 but NOT in store2)
Ist there any solutions how to do that without core hacking?
OpenCart commercial mods and development http://spotonsolutions.net
Layered Navigation
Shipment Tracking
Vehicle Year/Make/Model Filter
OpenCart commercial mods and development http://spotonsolutions.net
Layered Navigation
Shipment Tracking
Vehicle Year/Make/Model Filter
I used this for creating http://www.kite4ever.com/index.php? which is the main store and http://mutinykites.at/?shop which is only a new store front.
So if you have two different templates for different store fronts it works like this.
In every template you can make module overrides by simply copying the original module template files to catalog/view/theme/YOURTHEME1/template/Module/yourmodule.tpl (yourmodule.tpl can be one of the sidebar modules like newsletter, cart, information, eg.)
In theese files you can style or modify the modules, or simply uncomment or delete the code for not showing up the module in this template.
Hope this helped
customers in multistore feature of opencart;
registered customer of one store is allowed to login to other store of multistore feature as well?
although he is actually not registered at that second one?
edit> thanks for quick reply to previous question.
quick reply.Ljubo wrote:it is not the place to ask, but a quick reply needed...
customers in multistore feature of opencart;
registered customer of one store is allowed to login to other store of multistore feature as well?
although he is actually not registered at that second one?
edit> thanks for quick reply to previous question.
Yes.
OpenCart commercial mods and development http://spotonsolutions.net
Layered Navigation
Shipment Tracking
Vehicle Year/Make/Model Filter
In other words, you are saying that for different template / store, I could use any module I want, only to rename the .tpl file so it has the same name like completely different module in the primary template?gerigo wrote: In every template you can make module overrides by simply copying the original module template files to catalog/view/theme/YOURTHEME1/template/Module/yourmodule.tpl (yourmodule.tpl can be one of the sidebar modules like newsletter, cart, information, eg.)
In theese files you can style or modify the modules, or simply uncomment or delete the code for not showing up the module in this template.
Have a look if there's a login module to buy, otherwise we can do it for you for 500-1000 Euros.
Expensive, especially when the answer is freely available on the forum heregerigo wrote:I guess youre right concerning the registered customers login. I asked my programmer, this feature is complicated to work with the database and all other modlules and components. Maybe modifications of the corefiles are needed.
Have a look if there's a login module to buy, otherwise we can do it for you for 500-1000 Euros.
Modules for OpenCart 2.3.0.2
Homepage Module [Free - since OpenCart 0.7.7]
Multistore Extensions
Store Manager Multi-Vendor/Multi-Store management tool
If you're not living on the edge ... you're taking up too much space!
The "product" modules can be "multi-stored" very easily by wrapping the contents of the template file inside an "if" statement. Insert:
Code: Select all
<?php if ($products) { ?>
Code: Select all
<div class="box">
Code: Select all
<?php } ?>
If there are no products, the module will not display.
For the category module, change the above "if" to:
Code: Select all
<?php if ($category) { ?>
Code: Select all
<?php } ?>
If there are no categories, the category module will not display.
Modules for OpenCart 2.3.0.2
Homepage Module [Free - since OpenCart 0.7.7]
Multistore Extensions
Store Manager Multi-Vendor/Multi-Store management tool
If you're not living on the edge ... you're taking up too much space!
I think it is also important to be able to show / not show other modules as well.
I suppose the similar changes would be enough, am I right?
stupid example, I want for a custom module, lets say a calender, to be showed in store1 but not showed in store2.
I mean to add somewhere in the begining the line like:
<?php if ($modulename) { ?>
and, at ending to close it with:
<?php } ?>
Would that be enough?
No worries.Ljubo wrote:thank you for sharing this.
No. As far as the "product" modules and the category module are concerned, all the "if" does is check to see if there is any content for the module to display, and "hides" the module if there isn't any, rather than show an empty module.I mean to add somewhere in the begining the line like:
<?php if ($modulename) { ?>
and, at ending to close it with:
<?php } ?>
Would that be enough?
For example, to hide the shopping cart module when there is nothing in the shopping cart, you could use:
Code: Select all
<?php if ($this->cart->hasProducts()) { ?>
... cart code ...
<?php } ?>
Using something like:
Code: Select all
<?php if ($modulename) { ?>
... module code ...
<?php } ?>
Modules for OpenCart 2.3.0.2
Homepage Module [Free - since OpenCart 0.7.7]
Multistore Extensions
Store Manager Multi-Vendor/Multi-Store management tool
If you're not living on the edge ... you're taking up too much space!
Ok, I have just tested it.gerigo wrote:You can only change the style or appearance of the installed modules (and enabled in backend)
I have SimpleHTML module installed and have enabled it to both stores, 1 and 2.
- for the store 1, I use this module-space for displaying the day, date, and clock (found a java script for that, you can paste the code into HTML box of the backend and it works)
- for the store 2, I use this module-space for things that could be seen only to logged in customers of that second store. So, I have found the way to enter the code to display some warning notice to the unregistered customers and to display its real content once the user logs in.
And that is perfect!
But, I had to have some article look, as the Information module has, so, that when a registered customer clicks on an item in the module, that link to get him to another article page displayed like in information module.
So, I created and installed a copy of Information module but now the module displays for both stores with the same name (remember, with SimpleHTML module, you could name the same module differently for two stores).
Finaly, I got an idea to try to delete all the contents of the .tpl file of that copy of Information module, while it is still enabled in the backend.
The result is excellent, module is active but not showing, just the way I need it.
I will now put the contents like articles in that new module, to copy the exact links, and just paste them into SimpleHTML Module, so that it all works like I need.

Users browsing this forum: No registered users and 9 guests