Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Can not get Categorie counts off the Categories box?


Jaguars

Recommended Posts

:) Hello

 

I have up graded my store with another Navigation bar, that is produced with "XHTML" and "CSS" and two small gifs, and is now placed just above the "Breadcrumb" navigation bar in the header. This uses the id system of "oscommerce".

 

The problem I have after installing and testing, all is working except for one small area.

 

The "Categorie" counts is showing product quantity numbers, although the admin panel has this set to "False"

Also before the new Nav bar was installed this was not showing any numbers.??

 

When trying a full test run, the DVD side of things loses the number show when you drill down the list, but all other product categories show number quantities. Still on the example setup of "oscommerce.

 

I was told that the file, includes/boxes/categories.php is where this is driven from and not the header that I have worked upon.

 

I have used the "PDF" manual to make the following changes.

My own gif logo installed.

Change back ground colour and bar colours.

Alter the countrie drop down list to show "222" at the top of list when registering.

 

Nothing to drastic, I have included a small amount of the existing code for the categories.php, file.

 

function tep_show_category($counter) {

global $tree, $categories_string, $cPath_array;

 

for ($i=0; $i<$tree[$counter]['level']; $i++) {

$categories_string .= " ";

}

 

$categories_string .= '<a href="';

 

if ($tree[$counter]['parent'] == 0) {

$cPath_new = 'cPath=' . $counter;

} else {

$cPath_new = 'cPath=' . $tree[$counter]['path'];

}

 

$categories_string .= tep_href_link(FILENAME_DEFAULT, $cPath_new) . '">';

 

if (isset($cPath_array) && in_array($counter, $cPath_array)) {

$categories_string .= '<b>';

}

 

// display category name

$categories_string .= $tree[$counter]['name'];

 

if (isset($cPath_array) && in_array($counter, $cPath_array)) {

$categories_string .= '</b>';

}

 

if (tep_has_category_subcategories($counter)) {

$categories_string .= '->';

}

 

$categories_string .= '</a>';

 

if (SHOW_COUNTS == 'true') {

$products_in_category = tep_count_products_in_category($counter);

if ($products_in_category > 0) {

$categories_string .= ' (' . $products_in_category . ')';

}

}

 

$categories_string .= '<br>';

 

if ($tree[$counter]['next_id'] != false) {

tep_show_category($tree[$counter]['next_id']);

}

}

?>

<!-- categories //-->

<tr>

<td>

<?php

$info_box_contents = array();

$info_box_contents[] = array('text' => BOX_HEADING_CATEGORIES);

 

new infoBoxHeading($info_box_contents, true, false);

 

$categories_string = '';

$tree = array();

 

 

In the hope it may shed some light upon the problem.

 

Thanks for looking and any advice.

 

Dave

 

:thumbsup:

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...