megacool Posted November 13, 2003 Posted November 13, 2003 Basically I want my categories box to Display all categories i.e parent cats and subcategories at all times... so people don't have to click on a category to view its sub-cats.. but it will be all there for them.. so for example when someone loads up my site.. they will see... Cat 1 >Sub Cat >Sub Cat Cat 2 >Sub Cat > Sub Cat Cat 3 Cat 4 and so on... I also wanted to do a little ftext ormatting.. by adding bullets to each subcat.. Please help.. I kept reading and searching but didn't find anything.
megacool Posted November 13, 2003 Author Posted November 13, 2003 update : I found this http://www.oscommerce.com/community/contributions,62 But I dont think it will work with 2.2MS2 or would it?
Guest Posted November 13, 2003 Posted November 13, 2003 Its should work. No promises... but it should. Good Luck. -R
megacool Posted November 13, 2003 Author Posted November 13, 2003 Its should work. No promises... but it should. Good Luck. -R It works now.. but I am trying to figure out how to add those bullets and a heading above each category
megacool Posted November 13, 2003 Author Posted November 13, 2003 aarrgh I am confused.. the all_categories.php file doesn't make much sense to me I am looking to present my categories box like follows By Department: Gemstones Cubic Zirconia Gold Sterling Silver By Style: Gemstones Cubic Zirconia Gold Sterling Silver By Brand: Gemstones Cubic Zirconia Gold Sterling Silver Similar to HSN's site http://www.hsn.com/cnt/sf/default.aspx?sf=...;LNJLP020031014 Any ideas? I know I could just make a manual box.. but I wanna avoid doing that..I want to do it through a legitimate categories box
Guest Posted November 13, 2003 Posted November 13, 2003 This is how I did it for one of my clients sites... if ($tree[$counter]['parent'] == 0) { $categories_string .= ' <img src=images/nav_arrow.gif> <a href="'; } else { $categories_string .= ' ;<img src=images/nav_dot.gif> <a href="'; } Hope this helps. -R
akkinmore Posted November 14, 2003 Posted November 14, 2003 Anyone care to show me how the following contribution works? http://www.oscommerce.com/community/contributions,62 It doesn't come with any descriptions. Please help. Thanks.
Guest Posted November 14, 2003 Posted November 14, 2003 Here ya go... 1. Rename your existing catalog/includes/boxes/categories.php to categories.bak 2. Upload all_categories to the catalog/includes/boxes directory 3. Rename all_categories.php to categories.php 4. Test If it doesn't work or has an error, you can always rename the original back in place. See if it works for ya. -R
Guest Posted January 16, 2004 Posted January 16, 2004 This is how I did it for one of my clients sites... ? ?if ($tree[$counter]['parent'] == 0) { ? ? ?$categories_string .= ' <img src=images/nav_arrow.gif> <a href="'; ? ?} else { ? ? ?$categories_string .= ' ;<img src=images/nav_dot.gif> <a href="'; ? ?} Hope this helps. -R I tried this and it did not work for me, but with a little tweeking I got it to work thanks. I am not a php wizard and was doing it myself basically the same way but could not get mine to work due to the ' ' and " " and ; was not sure where to place and which ones to use for what. lol but with your help and my tweeks got the issue resolved this is what I put in my catalog/includes/boxes/categories.php starting from the top function tep_show_category($counter) { ? ? global $tree, $categories_string, $cPath_array; ? ? ? if ($tree[$counter]['parent'] == 0) { ? ? $categories_string .= ' <img src=images/checkout_bullet.gif> '; ? } else { ? ? $categories_string .= ' <img src=images/sub_dot.gif> '; ? } ? ? for ($i=0; $i<$tree[$counter]['level']; $i++) { ? ? ? $categories_string .= " "; ? ? } ? ? if ($tree[$counter]['parent'] == 0) { ? ? ? $cPath_new = 'cPath=' . $counter; ? ? } else { ? ? ? $cPath_new = 'cPath=' . $tree[$counter]['path']; ? ? } ? ? $categories_string .= '<a href="'; ? ? $categories_string .= tep_href_link(FILENAME_DEFAULT, $cPath_new) . '">'; ? ? if (isset($cPath_array) && in_array($counter, $cPath_array)) { ? ? ? $categories_string .= '<b>*'; ? ? } // display category name ? ? $categories_string .= $tree[$counter]['name']; ? ? if (isset($cPath_array) && in_array($counter, $cPath_array)) { ? ? ? $categories_string .= '</b>*'; ? ? } and ending here.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.