I'm looking for a contribution or help that will change the way the index page displays when clicking into a main category that has subs under it. Right now, by default it shows a picture and discription of the sub and then you click into the sub.
I would like it show products from the subs much like it displays when you actually click into the sub category.
I'm trying to find the contribution that did this:
http://www.vedicbooks.net/masters-c-57.html
I've found where I need to change the code to make it do that, but I can't seem to be able to put the together the correct syntax to make it work.
This is the code on the index page that displays the default layout for cats and subs when you click a main category:
Code:
$categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.categories_image, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . (int)$current_category_id . "' and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' order by sort_order, cd.categories_name");
}
$number_of_categories = tep_db_num_rows($categories_query);
$rows = 0;
while ($categories = tep_db_fetch_array($categories_query)) {
$rows++;
$cPath_new = tep_get_path($categories['categories_id']);
$width = (int)(100 / MAX_DISPLAY_CATEGORIES_PER_ROW) . '%';
echo " <a href=\"" . tep_href_link(FILENAME_CATEGORIES_INFO, 'name=' .str_replace("/", "/", rawurlencode($this_categories_name)). "/" . "cPath/" . $categories_id . $this_categories_id . (($this_language_code == DEFAULT_LANGUAGE) ? '' : ('&language=' . $this_language_code)), 'NONSSL', false) . "\">" . $this_categories_name . "</a>\n";
}
echo " </td>\n";
}
echo " </tr>\n";
}
}
Any help in the right direction would be much appreciated!