How do I add new pages (like warranty or manuals) under "customer service" in the footer?
Thank you.
This was easy to achieve in some earlier 1.4 versions of OC but was left out of v1.5.2.1 for some reason! Maybe it interferes with other functions but I have not yet found this to be true!
To achieve this in v1.5.2.1 in:
/catalog/model/catalog/information.php
Change:
Code: Select all
public function getInformations() {
$query = $this->db->query("SELECT * FROM " . DB_PREFIX . "information i LEFT JOIN " . DB_PREFIX . "information_description id ON (i.information_id = id.information_id) LEFT JOIN " . DB_PREFIX . "information_to_store i2s ON (i.information_id = i2s.information_id) WHERE id.language_id = '" . (int)$this->config->get('config_language_id') . "' AND i2s.store_id = '" . (int)$this->config->get('config_store_id') . "' AND i.status = '1' ORDER BY i.sort_order, LCASE(id.title) ASC");
return $query->rows;
}
To:
Code: Select all
public function getInformations() {
$query = $this->db->query("SELECT * FROM " . DB_PREFIX . "information i LEFT JOIN " . DB_PREFIX . "information_description id ON (i.information_id = id.information_id) LEFT JOIN " . DB_PREFIX . "information_to_store i2s ON (i.information_id = i2s.information_id) WHERE id.language_id = '" . (int)$this->config->get('config_language_id') . "' AND i2s.store_id = '" . (int)$this->config->get('config_store_id') . "' AND i.status = '1' AND i.sort_order <> '-1' ORDER BY i.sort_order, LCASE(id.title) ASC");
return $query->rows;
}
Create a new information page in admin containing the data you want and give it a sort order of 1
Enable the page and "Save".
The new page will now appear in the information section of the footer.
Go to the page and copy the address which shows in your browser.
Go back into admin and give this page a sort order of -1 and "Save".
You'll now find that the page with a sort order of -1 does not show in the information section.
Repeat the above for any additional pages.
You can now hardcode the above page addresses where you like under "Extras", "Customer Service" etc. in footer.tpl
eg. for Customer services enter:
Code: Select all
<div class="column">
<h3><?php echo $text_service; ?></h3>
<ul>
<li><a href="index.php?route=information/information&information_id=20">Warranty</a></li>
<li><a href="index.php?route=information/information&information_id=21">Manuals</a></li>
<li><a href="<?php echo $contact; ?>"><?php echo $text_contact; ?></a></li>
<li><a href="<?php echo $return; ?>"><?php echo $text_return; ?></a></li>
<li><a href="<?php echo $sitemap; ?>"><?php echo $text_sitemap; ?></a></li>
</ul>
</div>
Where the address for the 2 pages is determined as above (NOT THE ABOVE EXAMPLES OF 20 and 21).
BACKUP ANY FILES BEFORE CHANGING!