Post by mylasbags » Wed Jun 15, 2011 4:06 am

Hi! I want to remove the category count from the category column. Is there a way to remove this in the admin or do I have to do something with the code?
Last edited by mylasbags on Sat Sep 10, 2011 2:54 am, edited 1 time in total.

New member

Posts

Joined
Wed May 18, 2011 10:24 pm
Location - SC, USA

Post by Degsey » Fri Jun 17, 2011 11:01 am

You will have to alter the core code, this has been asked in another thread as well and we are waiting for for some helpfull replies.

Live Long and Prosper!

Degsey :-]

Visit us at :

http://www.Supreme-Ink.com


User avatar
New member

Posts

Joined
Sun Jun 12, 2011 2:29 am
Location - North Carolina

Post by Degsey » Fri Jun 17, 2011 11:33 am

Ok I have solved it.

See here on my development website http://www.laptopmadness.com

How to do it?

Edit this file /catalog/controller/module/catergory.php

Look for

Code: Select all

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

Code: Select all

'name'        => $category['name'],
This is in 2 places and each must be replaced.

Live Long and Prosper!

Degsey :-]

Visit us at :

http://www.Supreme-Ink.com


User avatar
New member

Posts

Joined
Sun Jun 12, 2011 2:29 am
Location - North Carolina

Post by mylasbags » Fri Jun 17, 2011 9:49 pm

My file @ /catalog/controller/module/catergory.php only shows that line 1 time, should I edit another category.php file?

New member

Posts

Joined
Wed May 18, 2011 10:24 pm
Location - SC, USA

Post by Degsey » Fri Jun 17, 2011 10:39 pm

That is the file and in V1.5xx it is repeated twice in the code.

This hack only takes out the side catergory count, I am working on the sub cats and the home page menu bar but time is very short at present.

Try just the one line that you see keep a copy of the old one and see what happens!

Live Long and Prosper!

Degsey :-]

Visit us at :

http://www.Supreme-Ink.com


User avatar
New member

Posts

Joined
Sun Jun 12, 2011 2:29 am
Location - North Carolina

Post by cmaster » Fri Jun 17, 2011 10:56 pm

mylasbags wrote:My file @ /catalog/controller/module/category.php only shows that line 1 time, should I edit another category.php file?
/catalog/controller/module/category.php

1.Search

Code: Select all

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

Code: Select all

'name'        => $child['name'],
2.Search

Code: Select all

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

Code: Select all

'name'        => $category['name'],

Newbie

Posts

Joined
Wed Jun 15, 2011 6:09 am

Post by cmaster » Fri Jun 17, 2011 11:02 pm

Remove Sub category count:

/catalog/controller/product/category.php

Find

Code: Select all

'name'  => $result['name'] . ' (' . $product_total . ')',
Replace with

Code: Select all

'name'  => $result['name'],

Newbie

Posts

Joined
Wed Jun 15, 2011 6:09 am

Post by keether » Sat Jun 18, 2011 12:09 am

degsey and cmaster = genious

Awesome thanks!

New member

Posts

Joined
Sat Sep 18, 2010 9:13 am

Post by budfox » Sun Jun 19, 2011 3:22 am

Could I just ask something here:

I seem to remember that when playing with 1.4x it was possible to leave core files untouched and over-ride them with duplicated/modified files based on a new template.

I too want to remove category counts but I'd like to do it a 'nice' way.

If someone could advise I'd appreciate it.

New member

Posts

Joined
Fri Oct 01, 2010 4:06 am

Post by tarik » Sun Jun 19, 2011 6:19 am

i have edited the two files and it doesnt appear to have done the trick on the top menu bar
Last edited by tarik on Mon Jun 20, 2011 12:39 am, edited 1 time in total.

Newbie

Posts

Joined
Tue Nov 09, 2010 8:47 pm

Post by AD. » Sun Jun 19, 2011 6:19 pm

For the top bar go to

Code: Select all

/catalog/controller/common/header.php
Look for:

Code: Select all

$product_total = $this->model_catalog_product->getTotalProducts($data);
									
$children_data[] = array(
	'name'  => $child['name'] . ' (' . $product_total . ')',
And Replace with:

Code: Select all

									
$children_data[] = array(
	'name'  => $child['name'],

AD.
Newbie

Posts

Joined
Sun Jun 19, 2011 4:56 pm

Post by Degsey » Sun Jun 19, 2011 11:24 pm

Thanks AD that just about raps up the whole thing!

Live Long and Prosper!

Degsey :-]

Visit us at :

http://www.Supreme-Ink.com


User avatar
New member

Posts

Joined
Sun Jun 12, 2011 2:29 am
Location - North Carolina

Post by tarik » Mon Jun 20, 2011 12:30 am

thank you all done ;D

Newbie

Posts

Joined
Tue Nov 09, 2010 8:47 pm

Post by budfox » Sat Jun 25, 2011 7:49 pm

Actually...what about where category counts appear in the page body under 'refine search'? Could someone point me to that module please.

Ta.

New member

Posts

Joined
Fri Oct 01, 2010 4:06 am

Post by AD. » Sun Jun 26, 2011 5:30 pm

That was covered in the first post by cmaster, if you make sure to do both of those things it should work.

AD.
Newbie

Posts

Joined
Sun Jun 19, 2011 4:56 pm

Post by budfox » Mon Jun 27, 2011 5:02 am

Oops, sorry.

New member

Posts

Joined
Fri Oct 01, 2010 4:06 am

Post by imadam » Sat Jul 30, 2011 7:08 am

i've done this and it works, but now the header drop down list is some reason not as wide as it should be. anyone know why this might change the size? it's no longer the length of the parent category width

my opencart carpet cleaning woking guildford and Office Cleaning Services in Guildford


Active Member

Posts

Joined
Sun Jan 10, 2010 10:47 pm
Location - Surrey

Post by Degsey » Thu Sep 08, 2011 11:02 pm

On an update there is a VQMod that does this for you and does not need any code alteration, even if you have partly taken out the code it will take out all product counts, even in subcats.

Live Long and Prosper!

Degsey :-]

Visit us at :

http://www.Supreme-Ink.com


User avatar
New member

Posts

Joined
Sun Jun 12, 2011 2:29 am
Location - North Carolina

Post by Landho » Sat Sep 10, 2011 6:42 am

Where is the VQMod?

Newbie

Posts

Joined
Sun Jul 10, 2011 1:34 am

rph
Expert Member

Posts

Joined
Fri Jan 08, 2010 5:05 am
Location - Lincoln, Nebraska
Who is online

Users browsing this forum: Bing [Bot] and 73 guests