There is a layout saying default so in my opinion the modules linked to default should be on every page. But if I link a module to layout default I can't see it anywhere.
So the question is: What means layout default and how can I make a module appear to every page.
Thanks a lot in advance.
Hope everyone can follow along, english is not my native language.
OpenCart commercial mods and development http://spotonsolutions.net
Layered Navigation
Shipment Tracking
Vehicle Year/Make/Model Filter
Let's take the "Welcome Module" to appear on all pages of the site. If there are 15 options in the dropdown you create 15 welcome messages?
For theme Installation and Customization, please send me a private message.
15 places where you put the same welcome messageraviG wrote:What do you mean by assign?
Let's take the "Welcome Module" to appear on all pages of the site. If there are 15 options in the dropdown you create 15 welcome messages?

Celestial - Martín Abel Rosales
WhatsApp: 50671482211
Email: martinrosales2012@hotmail.com
Skype: martin.abel.rosales
San José , Costa Rica
Yeah that's what I meant and this should not be the way to do it.celestial wrote:15 places where you put the same welcome message
It's probably a bug since there is an option "Default" and I can't seem to understand its use.
How to report that to the opencart devs?
For theme Installation and Customization, please send me a private message.
Yes, though the welcome one is the only one where it's that big of a deal at all. all the other modules you simply click add module 15 times then select the different pages. Not that big of deal. Yes I would conciser it something that needs to be fixed, but it's not a major deal particularly since you only do it once when you first set your store up.raviG wrote:What do you mean by assign?
Let's take the "Welcome Module" to appear on all pages of the site. If there are 15 options in the dropdown you create 15 welcome messages?
OpenCart commercial mods and development http://spotonsolutions.net
Layered Navigation
Shipment Tracking
Vehicle Year/Make/Model Filter
It's probably a bug since there is an option "Default" and I can't seem to understand its use.
How to report that to the opencart devs?[/quote]
there is a sticky post for 1.5.0.5 bugs. You can post it there and you can add it to the google code bug tracker.
OpenCart commercial mods and development http://spotonsolutions.net
Layered Navigation
Shipment Tracking
Vehicle Year/Make/Model Filter
Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig

Just paste the following code wherever you want in your template file:
Code: Select all
<? echo html_entity_decode($this->config->get('welcome_1_description_1')); ?>

For theme Installation and Customization, please send me a private message.
true, but it is selected as the "default" layout for the main store so one would assume (yes I know) that if you attached something to it, it would show up on all pages, but maybe that would only happen if there was no layout for a particlar page. Ok tested and that's what it is. Modules assigned to default take affect if there is no other layout assigned for that page. on one of my test installs I removed all layouts, but default then things assigned to default did show up on every page.JNeuhoff wrote:Looking at the code it seems that the 'Default' layout isn't being used anywhere in Opencart 1.5.0.x. In particular, it has no associated route to a controller attached to it.
OpenCart commercial mods and development http://spotonsolutions.net
Layered Navigation
Shipment Tracking
Vehicle Year/Make/Model Filter
At first I was a bit confused by the new layout stuff, both on the modules, and under system->design->layouts. I think I've figured out a good use case and explanation, so thought I'd share it.
The client has a shop side of the site, and an info side of the site. As such some modules should display on all shop type pages, and some on all info type pages. They also wanted to set the homepage to look different too. So, I...
- Went into system->design->layouts and notes what route was under each layout, then deleted them all, except the default, which you cant delete.
- Added a new layout called Info
- Added a couple of routes under this "affiliate/" and "information/"
- Added a new layout called Shop
- Added a couple of routes under this "product/", "checkout/" and "account/"
- Added a new layout called Home
- Added a couple of routes under this "common/home"
Hope this makes sense, I think this is the intended use case for this new layout feature. I thought this might be a handy share. Any Qs, just post here.
Thanks
Andy
I'm a web developer at http://www.ssofb.co.uk in Aberdeen, Scotland.
Got a random blog at http://www.andygaskell.blogspot.com/.
I have two stores. I managed to get the welcome message to work on both stores (with different text). However, store one search box did not work.
The easiest method (easy now but painful searching for the answer) for me is as follows:
Create a new Layout for each store. (Store1)(Store2)
No matter how I set the second store it continually reverts it's store setting to "Account" My first store setting is now set to: "Default"
In Store1 layout I have it set to "Default" >> common/home
In Store2 layout I have it set to "http://www.Store2.com" >> common/home
All modules I want assigned to my two stores have each store added as layouts. So.. Welcome has two tabs, first tab uses Store1 layout and the second tab has Store2 layout.
I thought I would throw this out there because the searching I did helped me figure out my problem. Maybe this post will help someone else.
What I did was check what parameters are sent when a module gets hooked to every route and what happens afterwards. Then I added a piece of code to the install() function of my module that mirrors that behavior without user needing to do it all manually.
You'll need to replace modulename with the actual name of your module and change the position to the one you need. I wanted to hook it to content_top.
For 1.5.0.x
Code: Select all
for ($i=0;$i<=10;$i++) {
$settings["modulename_{$i}_layout_id"] = $i+1;
$settings["modulename_{$i}_position"] = 'content_top';
$settings["modulename_{$i}_status"] = 1;
$settings["modulename_{$i}_sort_order"] = '';
$settings["modulename_module"] .= "$i,";
}
$settings["modulename_module"] = substr($settings["modulename_module"],0,-1);
$this->model_setting_setting->editSetting('modulename', $settings);
Code: Select all
for ($i=1;$i<=11;$i++)
$settings['modulename_module'][] = Array (
'layout_id' => $i,
'position' => 'content_top',
'status' => 1,
'sort_order' => ''
);
$this->model_setting_setting->editSetting('modulename', $settings);
This only gets the first welcome module & completely ignores the layout assignment. This is not the way you should be coding it.raviG wrote:Managed to display the "Welcome" module on all pages without creating it 11 times.
Just paste the following code wherever you want in your template file:Cheers.Code: Select all
<? echo html_entity_decode($this->config->get('welcome_1_description_1')); ?>
Never lose data again! Use Dropbox - DO THIS BEFORE YOU SIGNUP for Extra Space!!
http://db.tt/inKP3mv Signing up via this link gives you a bonus of 256 MB
More Bonuses: http://www.dropbox.com/free .5 GB
http://www.dropbox.com/edu = double your bonus referrals by giving an edu address.
Total ~ 3gb
Users browsing this forum: No registered users and 18 guests