Page 1 of 1

How to get rid of the numbers in the categories?

Posted: Mon Feb 06, 2012 3:16 pm
by Joe Mama
I am running 1.5.1.3 ans am pretty new to this. I have been reading other threads on how to get rid of the numbers at the end of product names but, when I use my cute to go into the listed folders and sub folders the I cant find the code listed to replace. Can anyone help a noob out with this? I running 1.5.1.3. Thanks. :)

Re: How to get rid of the numbers in the categories?

Posted: Mon Feb 06, 2012 6:45 pm
by MarketInSG
1. Open catalog/controller/module/
2. Open category.php
3. Find (line 48)

Code: Select all

					'name'        => $child['name'] . ' (' . $product_total . ')',
replace with

Code: Select all

					'name'        => $child['name'],
4. Find (line 62)

Code: Select all

				'name'        => $category['name'] . ' (' . $product_total . ')',
replace with

Code: Select all

				'name'        => $category['name'],
5. You're done!! ;)

Re: How to get rid of the numbers in the categories?

Posted: Tue Feb 07, 2012 1:24 pm
by Joe Mama
Thank you very much. I did everything you said but the numbers are still there. They might be gone in the category box on the left but, I cant remember. I should have said that I want them gone completely. Is there any way I can do that? Thanks again. :)

Re: How to get rid of the numbers in the categories?

Posted: Tue Feb 07, 2012 6:25 pm
by MarketInSG
Edit accordingly for the rest of the files it appears in

Re: How to get rid of the numbers in the categories?

Posted: Wed Feb 08, 2012 7:35 pm
by Joe Mama
LOL, Seriosly? :) Tell ya a little story... I once saw a guy drwning. He looked at me seeking help and asked " help, I am drowning?" I looked at him smugly from my dry piece of ground and said, " swim accordingly. One arm over the other." : I think I know what you mean and will give it a shot. Thanks ;)

Re: How to get rid of the numbers in the categories?

Posted: Wed Feb 08, 2012 7:40 pm
by MarketInSG
There's only 2 files it appears in for the default theme. How would I know where yours appear in your own theme? In the default theme, the other should be in the header.php file

Re: How to get rid of the numbers in the categories?

Posted: Thu Feb 09, 2012 1:32 pm
by Joe Mama
Thank you very much. I have figured it out. :)

Re: How to get rid of the numbers in the categories?

Posted: Thu Feb 09, 2012 8:21 pm
by MarketInSG
you are welcome (:

Re: How to get rid of the numbers in the categories?

Posted: Thu Mar 15, 2012 5:10 am
by steveharman
Aha! Thanks for this, it has **almost** solved my problem entirely.

Does anyone know where the total number of products variable is, when shown in the left-hand-column category list? i.e; if I click a parent category from say the top menu bar, I get a list of categories in the left-hand column and alongside each category is a value in brackets showing the number of products in it.... which I'd like to remove.

Following the posts in this thread I thought I might find it in /catalog/controller/common/column_left.php but it didn't leap out at me.

Thanks again.

Steve

p.s.
Seems like it's also in the main body of the page too, where the list of sub-categories is displayed [after selecting a top level parent category from the top menu]. Any thoughts as to where I might find that variable?

This does sound like an awfully nice setting we should have available to turn on or off, perhaps grouped near the 'Show stock levels' checkbox in Admin. It's not as if knowing the number of products in a category is really that interesting or useful anyway! ;-)

Re: How to get rid of the numbers in the categories?

Posted: Thu Mar 15, 2012 8:23 am
by MarketInSG
You won't find anything at column left. If you're talking about v1.5.2, you can turn it off via the admin panel for the category module. If you are talking about older version, do what is said at the top post. Can find in catalog/controller/module/category.php & also catalog/controller/product/category.php and you will find something like this

Code: Select all

'name'  => $result['name'] . ' (' . $product_total . ')',
just edit this will do

Re: How to get rid of the numbers in the categories?

Posted: Thu Mar 15, 2012 5:23 pm
by steveharman
Wow, thanks I'm almost there now (and it's v1.5.2)! :-)

The product count is now disabled in my left-hand-column as well as the top menu. It is however still showing up when I get a list of categories shown in the main 'body' of my page, thus; http://www.smartphonezoo.com/index.php? ... ry&path=59

Basically when I click a category from the top-menu-bar of the default template I'm presented with a list of categories in the main section of the page and I can't figure how to turn off the product count there.

Thanks again,

Steve

Re: How to get rid of the numbers in the categories?

Posted: Thu Mar 15, 2012 5:29 pm
by spitos
I have a an extension for this.
http://www.opencart.com/index.php?route ... on_id=3444

Simply download and install.

Re: How to get rid of the numbers in the categories?

Posted: Thu Mar 15, 2012 7:43 pm
by MarketInSG
Controller/product/category.php find in there. There is the code in there somewhere. Else you can get his mod.

Re: How to get rid of the numbers in the categories?

Posted: Thu Mar 15, 2012 8:48 pm
by steveharman
Superb, thanks. Found it.

Steve

Re: How to get rid of the numbers in the categories?

Posted: Fri Aug 17, 2012 7:51 pm
by OC Newbie
Hi,

I have removed successful the number of products next to the category thanks to this topic,

thank you so much ! ;D

Re: How to get rid of the numbers in the categories?

Posted: Sun Sep 29, 2013 7:27 pm
by aashishindulkar
[background=]

Code: Select all

[quote][/quote]
[/background]
MarketInSG wrote:1. Open catalog/controller/module/
2. Open category.php
3. Find (line 48)

Code: Select all

					'name'        => $child['name'] . ' (' . $product_total . ')',
replace with

Code: Select all

					'name'        => $child['name'],
4. Find (line 62)

Code: Select all

				'name'        => $category['name'] . ' (' . $product_total . ')',
replace with

Code: Select all

				'name'        => $category['name'],
5. You're done!! ;)
Hi I had Tried you idea it worked but, it brings the product count zero in the sub categpries, and product count is working in sub sub categories which i actually wanted,

now i want the zero in the sub categories product count to disappear

Re: How to get rid of the numbers in the categories?

Posted: Mon Sep 30, 2013 12:06 am
by MarketInSG
it shouldn't be displaying any count at all