MikeRasmussen Posted March 30, 2009 Share Posted March 30, 2009 Hi there.. I am haveing a problem with the menu expanding by itself like: Maincategori1 - Submenu - Submenu Maincategori2 - Submenu - Submenu And i would like it to be something like: Maincategori1 Maincategori2 Someone know what the problem may be? Link to comment Share on other sites More sharing options...
Guest Posted March 30, 2009 Share Posted March 30, 2009 Mike, if you are talking about removing the sub-categories from the Categories Listing, then : ===== STEP 1 ===== (optional) Remove "->" after category name that indicate sub-categories availability. Remember, you simply need to add /* before and */ after these lines. /* if (tep_has_category_subcategories($counter)) { $categories_string .= '->'; } */ ===== STEP 2 ===== Will remove sub-categories in categories boxes /* //------------------------ if (tep_not_null($cPath)) { $new_path = ''; reset($cPath_array); while (list($key, $value) = each($cPath_array)) { unset($parent_id); unset($first_id); $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . (int)$value . "' and c.categories_id = cd.categories_id and cd.language_id='" . (int)$languages_id ."' order by sort_order, cd.categories_name"); if (tep_db_num_rows($categories_query)) { $new_path .= $value; while ($row = tep_db_fetch_array($categories_query)) { $tree[$row['categories_id']] = array('name' => $row['categories_name'], 'parent' => $row['parent_id'], 'level' => $key+1, 'path' => $new_path . '_' . $row['categories_id'], 'next_id' => false); if (isset($parent_id)) { $tree[$parent_id]['next_id'] = $row['categories_id']; } $parent_id = $row['categories_id']; if (!isset($first_id)) { $first_id = $row['categories_id']; } $last_id = $row['categories_id']; } $tree[$last_id]['next_id'] = $tree[$value]['next_id']; $tree[$value]['next_id'] = $first_id; $new_path .= '_'; } else { break; } } } */ As noted by Duff1 in the contribution Section. Chris Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.