osCommerce by default displayes only top level categories in category box. To display all categories and sub-categories hierarchy in category box follow these instructions.
Steps:
- index.php – change on around line 37:
if ($category_depth == 'nested') {
To:
if ($category_depth == 'nested' && isset($HTTP_GET_VARS['cPath'])) {
- includes/application_top.php – change around line 437:
$cPath = '';
To:
$cPath = '0';
- includes/modules/boxes/bm_categories.php – find around line 99:
$parent_id = $categories['categories_id'];
Add:
$dbs[] = $categories['categories_id'];
- includes/modules/boxes/bm_categories.php – change at around line 109:
while (list($key, $value) = each($cPath_array)) {
To:
while (list($key, $value) = each($dbs)) {
Add a Comment