Hi There,
I have a category with a subcategory in it, aswell as products nested in the main category.
Eg go here: CDs : osCMax v2.0
and look on the left hand side and you will see CD main category with the subcategory 'Adventures in Osyessy'.
But you will notice that only the products in the CD category shows up and not the little image for the subcategory.
Is it possible to make it so both images and the subcategoies show up on the page.
I think it might have something do do with the following code in the index.php file but can't get it to work.
Any Help will be great.Code:// the following cPath references come from application_top.php $category_depth = 'top'; if (isset($cPath) && tep_not_null($cPath)) { $categories_products_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_TO_CATEGORIES . " where categories_id = '" . (int)$current_category_id . "'"); $cateqories_products = tep_db_fetch_array($categories_products_query); if ($cateqories_products['total'] > 0) { $category_depth = 'products'; // display products } else { $category_parent_query = tep_db_query("select count(*) as total from " . TABLE_CATEGORIES . " where parent_id = '" . (int)$current_category_id . "'"); $category_parent = tep_db_fetch_array($category_parent_query); if ($category_parent['total'] > 0) { $category_depth = 'nested'; // navigate through the categories } else { $category_depth = 'products'; // category has no products, but display the 'no products' message } } }
Cheers.




LinkBack URL
About LinkBacks






Bookmarks