Guest Posted October 3, 2009 Posted October 3, 2009 After searching through OSC websites I found the code that would help me indent my subcategories in the file: includes/boxes/categories.php. Apparently to indent my sub categories the following code below must be inserted, but I am having difficulty understanding where to insert it. $osC_CategoryTree->setSpacerString(' ', 2); Additionally there are images which appear under each category / subcategory line item and I would like this removed as it impairs the visibility of the text and makes the categories box larger than it should be. I just can't seem to find where the code is for this. Any guidance would be appreciated. Thanks Jeff www.nx4industries.com/index.php
Guest Posted October 4, 2009 Posted October 4, 2009 Alright so I think I've found the right spot and based onmy internet searches I have tried to edit the code, but it doesn't seem to have the effect it should. Here is the code below: // display category name $categories_string .= $tree[$counter]['name']; if (isset($cPath_array) && in_array($counter, $cPath_array)) { $categories_string .= '</b>'; } if (tep_has_category_subcategories($counter)) { $categories_string .= ' ' . ' ' . ' ' . ' ' . '->'; } I added all the ' ' items but it didn't seem to have the desired effect. I had also added it as follows and again it didn't provide any indent to sub categories: // display category name $categories_string .= ' ' . ' ' . ' ' . ' ' . $tree[$counter]['name']; if (isset($cPath_array) && in_array($counter, $cPath_array)) { $categories_string .= '</b>'; } if (tep_has_category_subcategories($counter)) { $categories_string .= '->'; } Can someone please help me out with this little piece of code?
♥ecartz Posted October 4, 2009 Posted October 4, 2009 The code to indent sub-categories is in a default install: function tep_show_category($counter) { global $tree, $categories_string, $cPath_array; for ($i=0; $i<$tree[$counter]['level']; $i++) { $categories_string .= " "; } $categories_string .= '<a href="'; Have you tried getting a copy of includes/boxes/categories.php from the distribution (under Solutions >> Downloads at the top of this page) and using that instead of the one that you have now? Always back up before making changes.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.