Forums / Templates, Stylesheets, Page Layout / putting category count IN category link

putting category count IN category link

Locked

Views: 1,742

Results 1 to 4 of 4
This thread is locked. New replies are disabled.
16 Jun 2006, 6:34 PM
#1
gleek avatar

gleek

New Zenner

Join Date:
Jun 2006
Location:
New York, NY
Posts:
8
Plugin Contributions:
0

putting category count IN category link

hi everyone,

i searched for this but couldn't find the answer. i've been looking at a lot of the class and template files and can't find the place to edit the PHP to get the category count inside the link!

right now, i get:

<a href="...">Product --></a> (2)

but i want to get:

<a href="...">Product --> (2)</a>

effectively putting the count INSIDE the a href so that i can apply the styles to the whole thing and the browser doesn't force a break there.

can someone tell me where this is so that i can edit it?

thanks!!

Zen Cart 1.3.0.1
Database Patch Level: 1.3.0.1
v1.3.0.1 [2006-06-06 13:05:40] (Fresh Installation)

16 Jun 2006, 10:59 PM
#2
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: putting category count IN category link

It's in the sideboxes/tpl_categories.php file.

More specifically, its this code block> if (SHOW_COUNTS == 'true') {

if ((CATEGORIES_COUNT_ZERO == '1' and $box_categories_array[$i]['count'] == 0) or $box_categories_array[$i]['count'] >= 1) {
$content .= CATEGORIES_COUNT_PREFIX . $box_categories_array[$i]['count'] . CATEGORIES_COUNT_SUFFIX;
}

}The functionality of which you would need to integrate into the blocks above to achieve your stated objective.

Kuroi Web Design and Development | Twitter

(Questions answered in the forum only - so that any forum member can benefit - not by personal message)

17 Jun 2006, 12:52 AM
#3
gleek avatar

gleek

New Zenner

Join Date:
Jun 2006
Location:
New York, NY
Posts:
8
Plugin Contributions:
0

Re: putting category count IN category link

oh thank you kuroi! you know, i was in that file today and i just must have been too tired to see that.. that's what happens when you stare at code too long :blink:

in this instance, i moved the </a> out of the PHP variable $content above the block of code you specified and moved it to the one below.

thanks for the keen eye.

17 Jun 2006, 8:39 AM
#4
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: putting category count IN category link

Absolutely the best solution :thumbsup:, and much better than my daft suggestion that you move the functionality :blush:

Kuroi Web Design and Development | Twitter

(Questions answered in the forum only - so that any forum member can benefit - not by personal message)