Support Forums

Show Category Count on Search Page

This is a discussion on Show Category Count on Search Page within the Technical Support forums, part of the Technical Support Forums category; Hi Everyone I am trying to show the category count total next to the category name in the category drop ...


Go Back   68 Classifieds Forums > Technical Support Forums > Technical Support

Reply
 
Thread Tools Display Modes
Old 07-26-2010, 11:07 AM   #1
Customer
 
Join Date: Jun 2010
Posts: 3
Rep Power: 0
easyboardsale is on a distinguished road
Default Show Category Count on Search Page

Hi Everyone

I am trying to show the category count total next to the category name in the category drop down list on the search page.... so drop down text would like like this <CatName (5)>

I have located the spot in the search.tpl file that needs to be updated, but I cannot work out where and how to put the code that returns the category count total.

I am pretty sure I need to use the get_count function in the categories.php file but thats as far as I get... any help would be appreciated.


thanks
easyboardsale is offline   Reply With Quote
Old 07-26-2010, 11:27 AM   #2
curmudgeon
 
Join Date: Mar 2006
Posts: 5,416
Rep Power: 139
Lhotch is a glorious beacon of light Lhotch is a glorious beacon of light Lhotch is a glorious beacon of light
Default

Im not following what you mean by category count. Do you mean the number of ads in a given category?

Also, to make sure you are given acurate advice you really should post what version of 68C you are using.
__________________
Larry

Knowledge learned is more valuable than knowledge given.
Lhotch is offline   Reply With Quote
Old 07-26-2010, 10:25 PM   #3
Customer
 
Join Date: Jun 2010
Posts: 3
Rep Power: 0
easyboardsale is on a distinguished road
Default

Hi yes, the number of ads in each category.

So on the search page, in the category drop down list, I want to show how many ads in the category next to the category name.... similar to what is done on the categories home page.

I am on the latest version 4.1.10

thanks in advance
easyboardsale is offline   Reply With Quote
Old 07-29-2010, 11:58 AM   #4
Customer
 
Join Date: Jun 2010
Posts: 3
Rep Power: 0
easyboardsale is on a distinguished road
Default

Can anyone help with this?
easyboardsale is offline   Reply With Quote
Old 07-29-2010, 12:24 PM   #5
curmudgeon
 
Join Date: Mar 2006
Posts: 5,416
Rep Power: 139
Lhotch is a glorious beacon of light Lhotch is a glorious beacon of light Lhotch is a glorious beacon of light
Default

Your going to have to modify the function that gets the cats and builds the dropdown. Add into the loop an aditional query to the database to get a cound tof reach category.

Truth be told this is a grose misunse of system resources and as your site gets busier you will find this wastes a lot of system resources and causes major slow down in page loads, espcially if you are on shared hosting.
__________________
Larry

Knowledge learned is more valuable than knowledge given.
Lhotch is offline   Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
show category names in search results business Templates, HTML, CSS, and Design Help 4 12-03-2009 04:36 PM
How to not show number of ads in link category on the index page rockabilly Technical Support 6 08-03-2009 08:58 AM
Just show category in the search.php banimp3 Technical Support 7 07-05-2009 06:29 PM
How to show listings on browse category page? rdouglas Technical Support 3 06-24-2009 08:11 AM
Count and show number of listings in showlistings.tpl jason1971 Technical Support 5 05-08-2009 04:00 AM


All times are GMT -4. The time now is 06:02 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0