Retard Smith Posted January 7, 2003 Share Posted January 7, 2003 First off, I do not know if this is in the right place, so if it is not, please let me know, and I will move it. On the Categories, in the top left corner of the page, it lists the amount of products in the parenthesis, is there any way to turn this off and not have it list this number? On a seperate note, I have some java classes that create a really nice tree, has anyone tried incorporating java into the osCommerce interface? Thanks, Aaron Link to comment Share on other sites More sharing options...
belladonna Posted January 7, 2003 Share Posted January 7, 2003 Hi and welcome :D If you take a look at "catalog/includes/boxes/categories.php" you will see: if (SHOW_COUNTS == 'true') { $products_in_category = tep_count_products_in_category($counter); if ($products_in_category > 0) { $categories_string .= ' (' . $products_in_category . ')'; } } Judging from the if-statement, my guess is one should be able to turn it off somewhere (maybe in the configuration-files) ... if this is not the case, you could for instance replace the categories_string-line with: $categories_string .= ''; ... hope that helps. Cheers! :) Link to comment Share on other sites More sharing options...
tresseh Posted January 7, 2003 Share Posted January 7, 2003 Hi there. In the code it appears as if there is a switch somewhere in the admin console, however if you want a hard coded solution, here's the answer: In /catalog/includes/boxes/categories.php at about Line 50 You'll see the code: if (SHOW_COUNTS == 'true') { $products_in_category = tep_count_products_in_category($counter); if ($products_in_category > 0) { $categories_string .= ' (' . $products_in_category . ')'; } } Comment this code out, like this: /* disables product counts if (SHOW_COUNTS == 'true') { $products_in_category = tep_count_products_in_category($counter); if ($products_in_category > 0) { $categories_string .= ' (' . $products_in_category . ')'; } } */ This will remove the product count from the category listing. HTH Regards, Jay. Link to comment Share on other sites More sharing options...
Evolution Wireless Posted January 7, 2003 Share Posted January 7, 2003 If you take a look at application_top at around line 155.. define('SHOW_COUNTS', 'true'); // show category count: true=Yes False=No Change true to false and your all done! Hope that helps ya! :D Link to comment Share on other sites More sharing options...
tresseh Posted January 7, 2003 Share Posted January 7, 2003 The problem with the change Belladonna suggested, is that all you are doing is removing the display from the web-site, however the code will still run. Using my method removes the code completely, and on websites with lots of products/categories, may well count towards a significant reduction in server overhead/processing. Just my tuppence :wink: HTH Regards, Jay. Link to comment Share on other sites More sharing options...
tresseh Posted January 7, 2003 Share Posted January 7, 2003 Ignore me, Evolution Wireless's fix is the correct method - i'm off to adjust my site now ;) Can never find these little flags when you want to - hehe! Regards, Jay. Link to comment Share on other sites More sharing options...
Evolution Wireless Posted January 7, 2003 Share Posted January 7, 2003 I wasnt sure if you were mocking me or not! Haha :wink: Link to comment Share on other sites More sharing options...
Retard Smith Posted January 7, 2003 Author Share Posted January 7, 2003 Thanks man for the help, guess I need to delve around a bit in the source to see how this works, although I installed this because I dont have the time to make my own. I apprecaite the help Thanks again, Aaron Link to comment Share on other sites More sharing options...
Guest Posted January 7, 2003 Share Posted January 7, 2003 http://www.oscommerce.com/community/contributions,580 -Al Link to comment Share on other sites More sharing options...
Retard Smith Posted January 7, 2003 Author Share Posted January 7, 2003 http://www.oscommerce.com/community/contributions,580 -Al Hey Al, Nice work sir, looks much better. Has anyone created a "tree" that is populated only once and would not require the page to be reloaded every time? I have a similar java.class for this, but I have not messed with it. - Aaron Link to comment Share on other sites More sharing options...
Guest Posted January 7, 2003 Share Posted January 7, 2003 Not that I know of. Why would you want that anyway? If you add a new category then you would have to add that item to your menu. -Al Link to comment Share on other sites More sharing options...
mouflon Posted January 7, 2003 Share Posted January 7, 2003 Nice work sir, looks much better. Has anyone created a "tree" that is populated only once and would not require the page to be reloaded every time? Just turn on the cache.... Unexpect the Expected Link to comment Share on other sites More sharing options...
belladonna Posted January 7, 2003 Share Posted January 7, 2003 The problem with the change Belladonna suggested, is that all you are doing is removing the display from the web-site, however the code will still run. Using my method removes the code completely, and on websites with lots of products/categories, may well count towards a significant reduction in server overhead/processing. Just my tuppence :wink: HTH ... absolutely right, uncommenting would be better :thumbsup: Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.