have you tried reading the entire thread:namasy wrote:plz i need hide some links from the list of information v1.4.8b
how?
http://forum.opencart.com/viewtopic.php ... ead#p31816
have you tried reading the entire thread:namasy wrote:plz i need hide some links from the list of information v1.4.8b
how?
Qphoria wrote:1. EDIT: catalog/model/catalog/information.php
2. FIND:3. REPLACE WITH:Code: Select all
$query = $this->db->query("SELECT * FROM " . DB_PREFIX . "information i LEFT JOIN " . DB_PREFIX . "information_description id ON (i.information_id = id.information_id) WHERE id.language_id = '" . (int)$this->language->getId() . "' ORDER BY i.sort_order ASC");
Then set the sort to -1 to hide it from the sidebox.Code: Select all
$query = $this->db->query("SELECT * FROM " . DB_PREFIX . "information i LEFT JOIN " . DB_PREFIX . "information_description id ON (i.information_id = id.information_id) WHERE id.language_id = '" . (int)$this->language->getId() . "' AND i.sort_order <> '-1' ORDER BY i.sort_order ASC");
Code: Select all
<?php
class ModelCatalogInformation extends Model {
public function getInformation($information_id) {
$query = $this->db->query("SELECT DISTINCT * 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 i.information_id = '" . (int)$information_id . "' AND 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'");
return $query->row;
}
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;
}
}
?>
Doing this in 1.5.0 seems to hide the category from both the category module in the side column AND in the top menu, is there a way to only exclude categories in the side category module but not in the top menu?Qphoria wrote:just add
right beforeCode: Select all
AND c.sort_order <> '-1'
and set the sort_order to -1 to hide from the sideCode: Select all
ORDER BY
I found the solution here - thanks uksitebuilder!kaylamatthews wrote:Doing this in 1.5.0 seems to hide the category from both the category module in the side column AND in the top menu, is there a way to only exclude categories in the side category module but not in the top menu?Qphoria wrote:just add
right beforeCode: Select all
AND c.sort_order <> '-1'
and set the sort_order to -1 to hide from the sideCode: Select all
ORDER BY
Kayla
James Hill
http://www.cypressparacord.com
This does remove the category from the sidebar, but it seems to remove it from the Site Map as well. Is there a way to keep it in the Site Map? Version 1.5.5.1Qphoria wrote:Very easy:
1. EDIT: catalog/model/catalog/category.php
2. FIND:3. REPLACE WITH:Code: Select all
public function getCategories($parent_id = 0) { $query = $this->db->query("SELECT * FROM " . DB_PREFIX . "category c LEFT JOIN " . DB_PREFIX . "category_description cd ON (c.category_id = cd.category_id) WHERE c.parent_id = '" . (int)$parent_id . "' AND cd.language_id = '" . (int)$this->language->getId() . "' ORDER BY c.sort_order"); return $query->rows; }
Now just set the sort order to -1 for all the ones you don't want to show.Code: Select all
public function getCategories($parent_id = 0) { $query = $this->db->query("SELECT * FROM " . DB_PREFIX . "category c LEFT JOIN " . DB_PREFIX . "category_description cd ON (c.category_id = cd.category_id) WHERE c.parent_id = '" . (int)$parent_id . "' AND cd.language_id = '" . (int)$this->language->getId() . "' AND c.sort_order <> '-1' ORDER BY c.sort_order"); return $query->rows; }
Ok... undo the change to the model file... and instead we can add the check to the category module itself so that ONLY the category module hides this.bountico wrote: This does remove the category from the sidebar, but it seems to remove it from the Site Map as well. Is there a way to keep it in the Site Map? Version 1.5.5.1
Thank you for your assistance!
Code: Select all
foreach ($categories as $category) {
Code: Select all
if ($category['sort_order'] == -1) { continue; }
My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.
Users browsing this forum: No registered users and 13 guests