You need to edit controller for category module
open catalog/controller/module/category.php in editor ( notepad++ or similar )
then find this (around line 48)
and replace like this
If you need to remove same thing in header menu
you need to edit header.php in catalog/controller/common
so open catalog/controller/common/header.php file
and find
and replace with this
And that is all
open catalog/controller/module/category.php in editor ( notepad++ or similar )
then find this (around line 48)
Code: Select all
$children_data[] = array(
'category_id' => $child['category_id'],
'name' => $child['name'] . ' (' . $product_total . ')',
'href' => $this->url->link('product/category', 'path=' . $category['category_id'] . '_' . $child['category_id'])
);
Code: Select all
$children_data[] = array(
'category_id' => $child['category_id'],
'name' => $child['name'] ,
'href' => $this->url->link('product/category', 'path=' . $category['category_id'] . '_' . $child['category_id'])
);
If you need to remove same thing in header menu
you need to edit header.php in catalog/controller/common
so open catalog/controller/common/header.php file
and find
Code: Select all
$children_data[] = array(
'name' => $child['name'] . ' (' . $product_total . ')',
'href' => $this->url->link('product/category', 'path=' . $category['category_id'] . '_' . $child['category_id'])
);
Code: Select all
$children_data[] = array(
'name' => $child['name'] ,
'href' => $this->url->link('product/category', 'path=' . $category['category_id'] . '_' . $child['category_id'])
);
Ok. Tried both of the above codes and it eliminate the Counts for Child Categories Only. The Header menu counts did eliminate as well.
So Category counts are still present in Parent Categories in Side Menu and also, Under "Refine your Search".
How to eliminate those as well?
Thanks in advance.
So Category counts are still present in Parent Categories in Side Menu and also, Under "Refine your Search".
How to eliminate those as well?
Thanks in advance.
Well i forgot for parent
but here is
in catalog/controller/module/category.php
find this ( around line 60 )
And replace with this
regarding Refine Your Search please specify url ( index.php?route=XXXXX/YYYYY )
specify me XXXXX and YYYYYY
and what version you use
regards

in catalog/controller/module/category.php
find this ( around line 60 )
Code: Select all
$this->data['categories'][] = array(
'category_id' => $category['category_id'],
'name' => $category['name'] . ' (' . $product_total . ')',
'children' => $children_data,
'href' => $this->url->link('product/category', 'path=' . $category['category_id'])
);
Code: Select all
$this->data['categories'][] = array(
'category_id' => $category['category_id'],
'name' => $category['name'],
'children' => $children_data,
'href' => $this->url->link('product/category', 'path=' . $category['category_id'])
);
specify me XXXXX and YYYYYY
and what version you use
regards
jomeza001 wrote:Ok. Tried both of the above codes and it eliminate the Counts for Child Categories Only. The Header menu counts did eliminate as well.
So Category counts are still present in Parent Categories in Side Menu and also, Under "Refine your Search".
How to eliminate those as well?
Thanks in advance.
also note that if you are going to remove the category counts you should probably go ahead and remove or comment out the $product_total line because it is one of the slowest parts of the entire cart. No need to let it continue to run if you are not going to display it.
OpenCart commercial mods and development http://spotonsolutions.net
Layered Navigation
Shipment Tracking
Vehicle Year/Make/Model Filter
Cool. I just installed the vQmod file and it works. Thanks again.
edit: Spoke too soon. This mod does not really disable the Left menu Categories Counters as of right now
edit: Spoke too soon. This mod does not really disable the Left menu Categories Counters as of right now

Last edited by jomeza001 on Wed Aug 31, 2011 6:25 am, edited 2 times in total.
Hello
Go to catalog/controller/product/ and edit category.php file
find this ( its around line 136)
and change to this
that will remove product count from refine
if you need help let me know
regards
Go to catalog/controller/product/ and edit category.php file
find this ( its around line 136)
Code: Select all
$this->data['categories'][] = array(
'name' => $result['name'] . ' (' . $product_total . ')',
'href' => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '_' . $result['category_id'] . $url)
);
Code: Select all
$this->data['categories'][] = array(
'name' => $result['name'] ,
'href' => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '_' . $result['category_id'] . $url)
);
that will remove product count from refine
if you need help let me know
regards
will345 wrote:I would like to know how to remove the counters in the refined search too. Running version 1.5.1. Any suggestions would be appreciated.
Who is online
Users browsing this forum: No registered users and 24 guests