Community Forums

How to get rid of the numbers in the categories?

General support for technical problems with OpenCart v1.x

How to get rid of the numbers in the categories?

Postby Joe Mama » Mon Feb 06, 2012 7:16 am

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. :)
Joe Mama
 
Posts: 12
Joined: Sun Jan 29, 2012 7:35 am

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

Postby MarketInSG » Mon Feb 06, 2012 10:45 am

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!! ;)
User avatar
MarketInSG
 
Posts: 2675
Joined: Wed Nov 16, 2011 3:53 am
Location: Singapore

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

Postby Joe Mama » Tue Feb 07, 2012 5:24 am

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. :)
Joe Mama
 
Posts: 12
Joined: Sun Jan 29, 2012 7:35 am

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

Postby MarketInSG » Tue Feb 07, 2012 10:25 am

Edit accordingly for the rest of the files it appears in
User avatar
MarketInSG
 
Posts: 2675
Joined: Wed Nov 16, 2011 3:53 am
Location: Singapore

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

Postby Joe Mama » Wed Feb 08, 2012 11:35 am

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 ;)
Joe Mama
 
Posts: 12
Joined: Sun Jan 29, 2012 7:35 am

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

Postby MarketInSG » Wed Feb 08, 2012 11:40 am

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
User avatar
MarketInSG
 
Posts: 2675
Joined: Wed Nov 16, 2011 3:53 am
Location: Singapore

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

Postby Joe Mama » Thu Feb 09, 2012 5:32 am

Thank you very much. I have figured it out. :)
Joe Mama
 
Posts: 12
Joined: Sun Jan 29, 2012 7:35 am

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

Postby MarketInSG » Thu Feb 09, 2012 12:21 pm

you are welcome (:
User avatar
MarketInSG
 
Posts: 2675
Joined: Wed Nov 16, 2011 3:53 am
Location: Singapore

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

Postby steveharman » Wed Mar 14, 2012 9:10 pm

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! ;-)
steveharman
 
Posts: 97
Joined: Mon Mar 12, 2012 10:36 am

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

Postby MarketInSG » Thu Mar 15, 2012 12:23 am

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
User avatar
MarketInSG
 
Posts: 2675
Joined: Wed Nov 16, 2011 3:53 am
Location: Singapore

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

Postby steveharman » Thu Mar 15, 2012 9:23 am

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
steveharman
 
Posts: 97
Joined: Mon Mar 12, 2012 10:36 am

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

Postby spitos » Thu Mar 15, 2012 9:29 am

I have a an extension for this.
http://www.opencart.com/index.php?route=extension/extension/info&extension_id=3444

Simply download and install.
Image Get it here
Google Analytics Expert - E-Commerce Tracking including Product Options, Goal & Funnel Reporting, Event Tracking, Search Tracking, Multi-Store compatibility & EU Cookie Law compliance. Works with Shoppica too!

Free Mods:
Remove Wishlist | Remember text in search box
Other Extensions:
Remove product counts, Opencart speedup & Improve page load time | All Extensions
User avatar
spitos
 
Posts: 258
Joined: Mon May 23, 2011 10:19 am
Location: UK

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

Postby MarketInSG » Thu Mar 15, 2012 11:43 am

Controller/product/category.php find in there. There is the code in there somewhere. Else you can get his mod.
User avatar
MarketInSG
 
Posts: 2675
Joined: Wed Nov 16, 2011 3:53 am
Location: Singapore

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

Postby steveharman » Thu Mar 15, 2012 12:48 pm

Superb, thanks. Found it.

Steve
steveharman
 
Posts: 97
Joined: Mon Mar 12, 2012 10:36 am

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

Postby OC Newbie » Fri Aug 17, 2012 11:51 am

Hi,

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

thank you so much ! ;D
OC Newbie

Version : french opencart v1.5.4

Theme : default
Modules : default
Host : 1&1
User avatar
OC Newbie
 
Posts: 6
Joined: Thu Aug 09, 2012 11:30 am
Location: Bordeaux


Return to General Support

Who is online

Users browsing this forum: Alexa [Bot], Bing [Bot], lloydmedley, PaulCutcliffe, soj47 and 67 guests

Hosted by Arvixe Web Hosting