Displaying all categories and sub-categories in category box in osCommerce

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.


  1. index.php – change on around line 37:
    if ($category_depth == 'nested') {


    if ($category_depth == 'nested' && isset($HTTP_GET_VARS['cPath'])) {
  2. includes/application_top.php – change around line 437:
    $cPath = '';


     $cPath = '0';
  3. includes/modules/boxes/bm_categories.php – find around line 99:
     $parent_id = $categories['categories_id'];


     $dbs[] = $categories['categories_id'];
  4. includes/modules/boxes/bm_categories.php – change at around line 109:
     while (list($key, $value) = each($cPath_array)) {


     while (list($key, $value) = each($dbs)) {

Ask J

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s