I have been using the below piece of code in the footer.php file in the controller folder to show the information links in the footer. It works fine in OC1.4.8 too but when I enable the maintenance mode, it gives an error
Fatal error: Call to a member function rewrite() on a non-object in C:\Server\xampp\htdocs\oc148\catalog\controller\common\footer.php on line 25
Can someone please help me on what is wrong with the line 25 which is
'href' => $this->model_tool_seo_url->rewrite(HTTP_SERVER . 'index.php?route=information/information&information_id=' . $result['information_id'])
);
Code: Select all
//Information links
$this->language->load('module/information');
$this->data['breadcrumbs'] = $this->document->breadcrumbs;
$this->data['text_special'] = $this->language->get('text_special');
$this->data['text_contact'] = $this->language->get('text_contact');
$this->data['text_sitemap'] = $this->language->get('text_sitemap');
$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->model_tool_seo_url->rewrite(HTTP_SERVER . 'index.php?route=information/information&information_id=' . $result['information_id'])
);
}
$this->data['contact'] = HTTP_SERVER . 'index.php?route=information/contact';
$this->data['sitemap'] = HTTP_SERVER . 'index.php?route=information/sitemap';
$this->data['special'] = HTTP_SERVER . 'index.php?route=product/special';
//end information links