OK, I managed to get the Information module to load in the footer, which is what I required for my site. Here's how I did it:
1. Start by making a copy of the module in your template so you aren't changing the default.
2. Create an option in Admin to allow the module position to be set to 'Footer'
Open file /admin/view/template/module/information.tpl and add the following code directly after the left/right position code, after line 27, before the </select> tag.
Code: Select all
<?php if ($information_position == 'footer') { ?>
<option value="footer" selected="selected"><?php echo 'Footer'; ?></option>
<?php } else { ?>
<option value="footer"><?php echo 'Footer'; ?></option>
<?php } ?>
3. Add code to the controller that processes the footer data so it will find the module. File, /catalog/controller/common/footer.php
Directly below
at the end of line 3 and before
Code: Select all
$this->language->load('common/footer');
add:
Code: Select all
$module_data = array();
$this->load->model('checkout/extension');
$results = $this->model_checkout_extension->getExtensions('module');
foreach ($results as $result) {
if ($this->config->get($result['key'] . '_status') && ($this->config->get($result['key'] . '_position') == 'footer')) {
$module_data[] = array(
'code' => $result['key'],
'sort_order' => $this->config->get($result['key'] . '_sort_order')
);
$this->children[] = 'module/' . $result['key'];
}
}
$sort_order = array();
foreach ($module_data as $key => $value) {
$sort_order[$key] = $value['sort_order'];
}
array_multisort($sort_order, SORT_ASC, $module_data);
$this->data['modules'] = $module_data;
4. Edit the Footer template file, /catalog/view/theme/YOUR_TEMPLATE/template/common/footer.tpl
Within the footer DIV add the following code:
Code: Select all
<div>
<?php foreach ($modules as $module) { ?>
<?php echo ${$module['code']}; ?>
<?php } ?>
</div>
You should assign an id to the div and style it in the stylesheet as required.
5. Strip the DIV tags from the module file.
------------------------------------------------------------
To make the sitemap file work instead of the information module, make a copy of the file under your template as I did the information module in step 1. /catalog/view/theme/YOUR_TEMPLATE/template/information/sitemap.tpl
Ignore step 2.
Step 3 you may not require the code I added, I expect you will also need to add a large section from /catalog/controller/common/header.php where all the variables are defined from around line 80 to around 105.
Step 4 use code:
Code: Select all
<div><?php include '/catalog/view/theme/YOUR_TEMPLATE/template/information/sitemap.tpl'; ?></div>
. Assign id and style as required.
Step 5 remains the same, take all the divs from the tpl file, also the php echos, just leaving the table.
I hope that helps!
Matt