First, open catalog/controller/common/footer.php -file
and change/replace all code to this
Code: Select all
<?php
class ControllerCommonFooter extends Controller {
protected function index() {
$this->language->load('common/footer');
$this->data['text_information'] = $this->language->get('text_information');
$this->data['text_service'] = $this->language->get('text_service');
$this->data['text_extra'] = $this->language->get('text_extra');
$this->data['text_account'] = $this->language->get('text_account');
$this->data['text_contact'] = $this->language->get('text_contact');
$this->data['text_return'] = $this->language->get('text_return');
$this->data['text_sitemap'] = $this->language->get('text_sitemap');
$this->data['text_manufacturer'] = $this->language->get('text_manufacturer');
$this->data['text_voucher'] = $this->language->get('text_voucher');
$this->data['text_affiliate'] = $this->language->get('text_affiliate');
$this->data['text_special'] = $this->language->get('text_special');
$this->data['text_login'] = $this->language->get('text_login');
$this->data['text_order'] = $this->language->get('text_order');
$this->data['text_wishlist'] = $this->language->get('text_wishlist');
$this->data['text_newsletter'] = $this->language->get('text_newsletter');
$this->load->model('catalog/information');
$this->data['informations'] = array();
foreach ($this->model_catalog_information->getInformations() as $result) {
$this->data['informations'][] = array(
'title' => $result['title'],
'href' => $this->url->link('information/information', 'information_id=' . $result['information_id'])
);
}
$this->data['contact'] = $this->url->link('information/contact');
$this->data['return'] = $this->url->link('account/return/insert', '', 'SSL');
$this->data['sitemap'] = $this->url->link('information/sitemap');
$this->data['manufacturer'] = $this->url->link('product/manufacturer', '', 'SSL');
$this->data['voucher'] = $this->url->link('checkout/voucher', '', 'SSL');
$this->data['affiliate'] = $this->url->link('affiliate/account', '', 'SSL');
$this->data['special'] = $this->url->link('product/special');
$this->data['login'] = $this->url->link('account/login', '', 'SSL');
$this->data['order'] = $this->url->link('account/order', '', 'SSL');
$this->data['wishlist'] = $this->url->link('account/wishlist', '', 'SSL');
$this->data['newsletter'] = $this->url->link('account/newsletter', '', 'SSL');
$this->data['powered'] = sprintf($this->language->get('text_powered'), $this->config->get('config_name'), date('Y', time()));
$this->load->model('design/layout');
$this->load->model('catalog/category');
$this->load->model('catalog/product');
$this->load->model('catalog/information');
if (isset($this->request->get['route'])) {
$route = $this->request->get['route'];
} else {
$route = 'common/home';
}
$layout_id = 0;
if (substr($route, 0, 16) == 'product/category' && isset($this->request->get['path'])) {
$path = explode('_', (string)$this->request->get['path']);
$layout_id = $this->model_catalog_category->getCategoryLayoutId(end($path));
}
if (substr($route, 0, 16) == 'product/product' && isset($this->request->get['product_id'])) {
$layout_id = $this->model_catalog_product->getProductLayoutId($this->request->get['product_id']);
}
if (substr($route, 0, 16) == 'product/information' && isset($this->request->get['information_id'])) {
$layout_id = $this->model_catalog_information->getInformationLayoutId($this->request->get['information_id']);
}
if (!$layout_id) {
$layout_id = $this->model_design_layout->getLayout($route);
}
if (!$layout_id) {
$layout_id = $this->config->get('config_layout_id');
}
$module_data = array();
$this->load->model('setting/extension');
$extensions = $this->model_setting_extension->getExtensions('module');
foreach ($extensions as $extension) {
$modules = explode(',', $this->config->get($extension['code'] . '_module'));
foreach ($modules as $module) {
if ($this->config->get($extension['code'] . '_' . $module . '_layout_id') == $layout_id && $this->config->get($extension['code'] . '_' . $module . '_position') == 'content_footer' && $this->config->get($extension['code'] . '_' . $module . '_status')) {
$module_data[] = array(
'code' => $extension['code'],
'module' => $module,
'sort_order' => $this->config->get($extension['code'] . '_' . $module . '_sort_order')
);
}
}
}
$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'] = array();
foreach ($module_data as $module) {
$module = $this->getChild('module/' . $module['code'], $module['module']);
if ($module) {
$this->data['modules'][] = $module;
}
}
if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/common/footer.tpl')) {
$this->template = $this->config->get('config_template') . '/template/common/footer.tpl';
} else {
$this->template = 'default/template/common/footer.tpl';
}
$this->render();
}
}
?>
Code: Select all
<?php foreach ($modules as $module) { ?>
<?php echo $module; ?>
<?php } ?>
Code: Select all
$this->data['text_content_bottom'] = $this->language->get('text_content_bottom'); $this->data['text_content_footer'] = $this->language->get('text_content_footer');
Code: Select all
<?php if (${'mymodule_' . $module . '_position'} == 'content_bottom') { ?>
<option value="content_bottom" selected="selected"><?php echo $text_content_bottom; ?></option>
<?php } else { ?>
<option value="content_bottom"><?php echo $text_content_bottom; ?></option>
<?php } ?>
Code: Select all
<?php if (${'mymodule_' . $module . '_position'} == 'content_footer') { ?>
<option value="content_footer" selected="selected"><?php echo $text_content_footer; ?></option>
<?php } else { ?>
<option value="content_footer"><?php echo $text_content_footer; ?></option>
<?php } ?>