scarlett0512 Posted July 28, 2006 Posted July 28, 2006 I have been using this contribution for a while, but it is only now when we're about to move our site to a new domain that I want to make a few changes. I only use the subtab categories because I have the main categories in the header. Is there a way to list the subcategories in columns instead of listing them continuously in one line (for example, in 3 columns)? This is what my subtab looks like now: I would like it to resemble what I have done with the subcategories in our Customer Service section. Thanks for your help in advance. Quote
yt_boy Posted August 21, 2007 Posted August 21, 2007 i have found a bug with this. if you select a product from any of the info boxes, the tabs at the top do not reflect where you have gone to? can someone please advise on a cure? many thanks YT Quote there are 10 types of people who understand binary those that do, and those that don't
itsjust Posted March 10, 2008 Posted March 10, 2008 i have found a bug with this. if you select a product from any of the info boxes, the tabs at the top do not reflect where you have gone to? can someone please advise on a cure? many thanks YT Well it works fine for me Quote
itsjust Posted March 10, 2008 Posted March 10, 2008 i have 3 levels of categories Main,Sub & Sub2, now when a sub is clicked it will show all of the sub2 cats aswell, how can i make it so it does not show any sub2 cats? The solution to this is using the following if statement if ($fooa[$counter]['level'] == 1) { } Like this Change // display category name $subcategories_string .= $fooa[$counter]['name']; $subcategories_string .= '</a> '; if ($fooa[$counter]['next_id']) { $subcategories_string .= '| '; show_subcategories($fooa[$counter]['next_id']); }else{ $subcategories_string .= ' '; } } to // display category name if ($fooa[$counter]['level'] == 1) { $subcategories_string .= $fooa[$counter]['name']; } $subcategories_string .= '</a> '; if ($fooa[$counter]['next_id']) { if ($fooa[$counter]['level'] == 1) { $subcategories_string .= '| '; } show_subcategories($fooa[$counter]['next_id']); }else{ $subcategories_string .= ' '; } } Change the == 1 to what ever you need. == 2 would means only show sub level 2. <=2 would mean show sublevel 1 and 2. Play with it Quote
TracyS Posted June 20, 2008 Posted June 20, 2008 (edited) I am using this with STS and have found that when I have more subcategories than will fit in one row across, the whole subcategories area becomes distorted and won't properly display all of the subcategory names. Any idea on what is causing this? Also - for cagegories that do not have a subcategory - is there a way to hide the subcategories row? PS - Once you have clicked into a subcategory, the category tab no longer is a link to that category - how do you make it so they can click that tab and get back to the parent category? The solution to this is using the following if statement if ($fooa[$counter]['level'] == 1) { } Change the == 1 to what ever you need. == 2 would means only show sub level 2. <=2 would mean show sublevel 1 and 2. Play with it Edited June 20, 2008 by TracyS Quote ~Tracy
TracyS Posted June 20, 2008 Posted June 20, 2008 Figured out one part - the ability to keep the category tab's linked, so if they are in a subcategory and want to get back to the parent category page they can. In includes/categories_tab.php I changed this: // if tab selected we dont need a link if (!$onpage) { $categories_string .= '<a class="tabsNavigation" href="'; $categories_string .= tep_href_link(FILENAME_DEFAULT, $cPath_new); $categories_string .= '">'; } to this: // if tab selected we dont need a link // if (!$onpage) { $categories_string .= '<a class="tabsNavigation" href="'; $categories_string .= tep_href_link(FILENAME_DEFAULT, $cPath_new); $categories_string .= '">'; // } Still trying to figure out the hiding when no subcategories are present, and why it gets all weirded out if the subcategories won't fit in just one row across the page. I am using this with STS and have found that when I have more subcategories than will fit in one row across, the whole subcategories area becomes distorted and won't properly display all of the subcategory names. Any idea on what is causing this? Also - for cagegories that do not have a subcategory - is there a way to hide the subcategories row? PS - Once you have clicked into a subcategory, the category tab no longer is a link to that category - how do you make it so they can click that tab and get back to the parent category? Quote ~Tracy
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.