dailce Posted June 8, 2009 Share Posted June 8, 2009 Hi, I installed this contribution: http://addons.oscommerce.com/info/5351 Works fine, click a category and it will show all the products in the category including the subcategories. However, at the top it shows a basic list of the subcategories. This is mainly in the code: <?php if ($_GET['manufacturers_id'] == ''){ if (isset($cPath)) { if (ereg('_', $cPath)) { $category_links = array_reverse($cPath_array); $cat_to_search = $category_links[0]; }else { $cat_to_search = $cPath; } // check to see if there are deeper categories within the current category $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 = '" . $cat_to_search . "' and c.categories_id = cd.categories_id and cd.language_id = '" . $languages_id . "' order by sort_order, cd.categories_name"); if (tep_db_num_rows($categories_query) > 0 ) { while ($categories = tep_db_fetch_array($categories_query)) { $cPath_new = tep_get_path($categories['categories_id']); echo '<a href="' . tep_href_link(FILENAME_DEFAULT, $cPath_new) . '">' . $categories['categories_name'] . '</a><br/>'; } } } }else{ echo ''; } ?> How can I change the code above to have the links in a dropdown, and when the user changes an option in the dorpdown they are brought to the link? Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.