Forums / Setting Up Categories, Products, Attributes / Hide category count -- on only ONE category

Hide category count -- on only ONE category

Locked

Views: 9,728

Results 21 to 32 of 32
This thread is locked. New replies are disabled.
1 Feb 2010, 6:14 AM
#21
lissae avatar

lissae

Totally Zenned

Join Date:
Oct 2007
Location:
Australia
Posts:
814
Plugin Contributions:
0

Hide category count -- on only ONE category

Ajeh:

An example would be, if the Gift Certificates are in categories_id 21 then you could use:

if (SHOW_COUNTS == 'true' && $counter != 21) {
  $products_in_category = zen_count_products_in_category($counter);
  if ($products_in_category > 0) {
    $this->box_categories_array[$ii]['count'] = $products_in_category;
  } else {
    $this->box_categories_array[$ii]['count'] = 0;
  }
}

I know this is a really really old thread LOL but I'd like to just hide the category counts on the top level categories but still show them on the subcats...what would I need to change in the above code to do that? Or how to make the category excluded there into an array instead I spose lol

HunnyBee Design
"A man's manners are a mirror in which he shows his portrait." ~ Johann Wolfgang von Goethe

1 Feb 2010, 3:21 PM
#22
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Hide category count -- on only ONE category

Around line 183 you can change it to read:

    if (!$this->tree[$counter]['parent'] == 0 && SHOW_COUNTS == 'true') {

This will exclude the Category Counts on all Parent Categories ... :smile:

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

1 Feb 2010, 6:50 PM
#23
lissae avatar

lissae

Totally Zenned

Join Date:
Oct 2007
Location:
Australia
Posts:
814
Plugin Contributions:
0

Re: Hide category count -- on only ONE category

You rock, Ajeh! Thanx :D

HunnyBee Design
"A man's manners are a mirror in which he shows his portrait." ~ Johann Wolfgang von Goethe

1 Feb 2010, 9:34 PM
#24
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Hide category count -- on only ONE category

You are most welcome ... thanks for the update that this worked for you to disable the categories count on top level parent categories in the categories sidebox ... :smile:

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

2 Feb 2010, 3:12 AM
#25
lissae avatar

lissae

Totally Zenned

Join Date:
Oct 2007
Location:
Australia
Posts:
814
Plugin Contributions:
0

Re: Hide category count -- on only ONE category

hehe I wanna be like you when I grow up :P

HunnyBee Design
"A man's manners are a mirror in which he shows his portrait." ~ Johann Wolfgang von Goethe

2 Feb 2010, 3:42 AM
#26
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Hide category count -- on only ONE category

All you have to do is learn to type really, really fast ... there are only 26 letters and 10 digits and eventually you will get the combination of letters and numbers right and you can call it code ... :lamo:

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

2 Feb 2010, 3:58 AM
#27
lissae avatar

lissae

Totally Zenned

Join Date:
Oct 2007
Location:
Australia
Posts:
814
Plugin Contributions:
0

Re: Hide category count -- on only ONE category

ROFLMAO does mashing the keyboard count? gigglez

HunnyBee Design
"A man's manners are a mirror in which he shows his portrait." ~ Johann Wolfgang von Goethe

2 Feb 2010, 4:58 AM
#28
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Hide category count -- on only ONE category

I have made some interesting code in the wee hours of the morning beyond the QWERTY keys ... :cool:

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

17 Mar 2010, 4:30 PM
#29
darnaez avatar

darnaez

Zen Follower

Join Date:
Jun 2009
Location:
Miami, Fl
Posts:
138
Plugin Contributions:
0

Re: Hide category count -- on only ONE category

My problem is this. In my store (with a purchased template) I can't see the product in a category. So I went to My Admin/Configuration / My Store/ Show Category Count ... to "True". The result is... the number appear just under the Categories line. For example:

Gift Certificates->
(2)

How can I place it in the same line?

A second question is... There are any way to show (NEW!) when I add a New Category? or al list a Red Dot to show the users that new products are in that category? :huh:

28 Apr 2010, 5:20 PM
#30
darnaez avatar

darnaez

Zen Follower

Join Date:
Jun 2009
Location:
Miami, Fl
Posts:
138
Plugin Contributions:
0

Re: Hide category count -- on only ONE category

Anybody knows how to do this????

Here is the link where you can see the problem. Thanks!

www.cryo64.com/store

28 Apr 2010, 6:49 PM
#31
lissae avatar

lissae

Totally Zenned

Join Date:
Oct 2007
Location:
Australia
Posts:
814
Plugin Contributions:
0

Re: Hide category count -- on only ONE category

Remove the line in red:

#categories li a {
color:#000000;
display:block;
font-size:11px;
font-weight:normal;
line-height:18px;
padding-left:0;
text-decoration:none;

}

HunnyBee Design
"A man's manners are a mirror in which he shows his portrait." ~ Johann Wolfgang von Goethe

28 Apr 2010, 7:13 PM
#32
darnaez avatar

darnaez

Zen Follower

Join Date:
Jun 2009
Location:
Miami, Fl
Posts:
138
Plugin Contributions:
0

Re: Hide category count -- on only ONE category

What can I say? I love you... LOL. Thanks a lot LissaE