Post by tarik » Sat Jun 18, 2011 11:19 pm

Hi guys im struggling to find out the correct way to describe this so i can really find anything relating to what im searching.
I basically just want to remove the little number that is next to the category in the menu bar so for example if there is one product in the category then it has (1) next to it.
I cant seem to find any settings in the control panel for it but then again i might just be blind.
Im using 1.5 btw.
thanks for any help in advance.
Last edited by i2Paq on Sun Jun 19, 2011 1:17 am, edited 1 time in total.
Reason: Use [version] TAG in subject!

Newbie

Posts

Joined
Tue Nov 09, 2010 8:47 pm

Post by ifyouseek » Thu Jun 23, 2011 12:21 pm

did you find out how to do this? i would like to remove the counter too!

Active Member

Posts

Joined
Thu May 06, 2010 4:40 pm

Post by harryo40 » Thu Jun 23, 2011 8:38 pm

tarik wrote:I basically just want to remove the little number that is next to the category in the menu bar so for example if there is one product in the category then it has (1) next to it.
I cant seem to find any settings in the control panel for it but then again i might just be blind.
Im using 1.5 btw.
thanks for any help in advance.
If I am right, you just want your customers to see the categories in the dropdown menu without the quantities in brackets i.e. (2) ?
You can do this by altering one line of code in the catalog/controller/header.php file.
Find the following line of code (around line 200) . . .

Code: Select all

						'name'  => $child['name'] . ' (' . $product_total . ')',
& change it to this . . .

Code: Select all

						'name'  => $child['name'],// . ' (' . $product_total . ')',
This will still show your categories but without the qty (2)
To change it back, simply delete these 3 characters . . .

Code: Select all

,//
that show after ['name'] ;)
Last edited by harryo40 on Sun Jul 31, 2011 6:29 pm, edited 1 time in total.

Add To Cart Confirm Ajax Popup for OC 1.5.1.3 --> 1.5.5.1 - Add to Cart Confirmation Popup
Image Map Banner Module - Image Map Banner Module
----------------------------------------------------------------------
Womens Famous Name Fashion Clothing at bargain prices - Next2nowt.com


Active Member

Posts

Joined
Wed Oct 21, 2009 3:37 am
Location - Blackburn, Lancashire

Post by hellogoodbye » Fri Jun 24, 2011 7:20 am

Thanks for the tip! and if you want to edit the one in the category module, the file is in catalog/controller/module/category.php

New member

Posts

Joined
Wed May 04, 2011 6:33 am

Post by Degsey » Sun Jun 26, 2011 9:57 am

If yoy want to do a search this issue has been covered in full in another thread.

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 bob71 » Mon Aug 01, 2011 4:17 am

I have been searching and not able to find anything which works

above example does not work for me

On main page when we see category with total products I want to remove those qty with bracket
any solution?

Newbie

Posts

Joined
Sun Jul 31, 2011 2:15 pm

Post by spitos » Tue Aug 02, 2011 4:01 pm

Undo the previous changes and upload this vqmod i made to get rid of the product count in all areas.

!!!!!UPDATE!!!!!
I've updated this file to reduce load times and some other minor improvements.
Please see this thread for the latest version:
http://www.opencart.com/forum/viewtopic ... 31&t=39194
Last edited by spitos on Mon Mar 12, 2012 5:07 pm, edited 1 time in total.

Image
Google Analytics Expert - Advanced e-commerce tracking, Product & options reporting, transaction/conversion reporting, Google Adwords conversion & profit reporting, goal & funnel reporting, event tracking, site search tracking, multi-store compatibility, EU Cookie Law compliance and works with any theme or checkout! Easy vqmod install. Get it here


User avatar
Active Member

Posts

Joined
Mon May 23, 2011 6:19 pm
Location - UK

Post by freetester » Mon Mar 12, 2012 4:16 am

remove counter next to product in category menu

The solution of "harryo40" above guides to the right direction but you have to fulfill changes on other three points, in other two scripts!!!

The whole solution:

First change:

Open category.php with your preferred editor on => catalog/controller/module/category.php

Go to the line 48: 'name' => $child['name'] . ' (' . $product_total . ')'
Change it to: 'name' => $child['name'],// . ' (' . $product_total . ')'

Go to line 62: 'name' => $category['name'] . ' (' . $product_total . ')',
Change it to: 'name' => $category['name'],// . ' (' . $product_total . ')',



Second change:

Open category.php on => catalog/controller/product/category.php

Go to line 137: 'name' => $result['name'] . ' (' . $product_total . ')'
Change it to: 'name' => $result['name'],// . ' (' . $product_total . ')'


Third change:

Open category.php on => catalog/controller/common/header.php

Go to line: 'name' => $child['name'] . ' (' . $product_total . ')',
Change it to: 'name' => $child['name'],// . ' (' . $product_total . ')',

Thanks to "harryo40" for his IDEA


Hope it helps...

FREETESTER

Newbie

Posts

Joined
Sun Mar 11, 2012 3:43 am

Post by undersound » Wed Mar 14, 2012 3:49 am

I have created a vqmod for this but when searching for the string:

Code: Select all

'name' => $child['name'] . ' (' . $product_total . ')'
it returns no result

when I search for: (mind the extra space between 'name' and =>)

Code: Select all

'name'  => $child['name'] . ' (' . $product_total . ')'
I do get a hit.

Although I like the way of being able to make changes without touching core files this method seems very error prone to me especially with regard to spaces (like mentioned above).

I am using opencart 1.5.1.3.

Newbie

Posts

Joined
Wed Jan 11, 2012 5:04 pm

Post by yesweus » Wed Mar 21, 2012 11:07 pm

Thanks

Newbie

Posts

Joined
Wed Feb 29, 2012 9:23 pm

Post by aquilla » Sat Sep 29, 2012 12:01 pm

freetester wrote:remove counter next to product in category menu

The solution of "harryo40" above guides to the right direction but you have to fulfill changes on other three points, in other two scripts!!!

The whole solution:

First change:

Open category.php with your preferred editor on => catalog/controller/module/category.php

Go to the line 48: 'name' => $child['name'] . ' (' . $product_total . ')'
Change it to: 'name' => $child['name'],// . ' (' . $product_total . ')'

Go to line 62: 'name' => $category['name'] . ' (' . $product_total . ')',
Change it to: 'name' => $category['name'],// . ' (' . $product_total . ')',



Second change:

Open category.php on => catalog/controller/product/category.php

Go to line 137: 'name' => $result['name'] . ' (' . $product_total . ')'
Change it to: 'name' => $result['name'],// . ' (' . $product_total . ')'

Third change:

Open category.php on => catalog/controller/common/header.php

Go to line: 'name' => $child['name'] . ' (' . $product_total . ')',
Change it to: 'name' => $child['name'],// . ' (' . $product_total . ')',

Thanks to "harryo40" for his IDEA


Hope it helps...

FREETESTER
UPDATE vers. 1.5.3.1


First change:

Open category.php with your preferred editor on => catalog/controller/module/category.php

Go to the line 49: 'name' => $child['name'] . ' (' . $product_total . ')'
Change it to: 'name' => $child['name'],// . ' (' . $product_total . ')'

Go to line 71: 'name' => $category['name'] . ' (' . $product_total . ')',
Change it to: 'name' => $category['name'],// . ' (' . $product_total . ')',



Second change:

Open category.php on => catalog/controller/product/category.php

Go to line 137: 'name' => $result['name'] . ' (' . $product_total . ')',
Change it to: 'name' => $result['name'],// . ' (' . $product_total . ')',



Third change:

Open category.php on => catalog/controller/common/header.php

Go to line: 'name' => $child['name'] . ' (' . $product_total . ')';
Change it to: 'name' => $child['name'];// . ' (' . $product_total . ')';




This is what I have done and it works fine. 8)

Newbie

Posts

Joined
Thu Apr 26, 2012 3:31 pm
Who is online

Users browsing this forum: Google [Bot] and 35 guests