atombomb96 Posted October 18, 2006 Posted October 18, 2006 Hi Everyone, I bet this is such an oversight on my part, but I cannot for the life of me find where "Categories" is coming from twice in my categories box. See the site here Just before the categories in the categories box you see "Eat, Live and Sleep". I can't get rid of the "Categories" (in white) displayed above them. If I rem out the line below from catalog\includes\boxes\categories.php it also removes "Categories" from the Box Header.. arghhhh :rolleyes: I did add the all products mod, but even if I // that out and put the original line back in, it still appears. The lines from categories.php are: // LINE BELOW FOR ALL PRODUCTS MOD $info_box_contents[] = array('text' => '<a href="' . tep_href_link(FILENAME_ALL_PRODUCTS) . '" class="headerNavigation">' . BOX_HEADING_CATEGORIES . '</a><br>' ); // $info_box_contents[] = array('text' => BOX_HEADING_CATEGORIES); new infoBoxHeading($info_box_contents, false, false); I've looked through the database to see if there was a phantom category called "Categories", but no luck. I bet its so simple but I missed. :D Any pointers appreciated, I'll be really grateful gang, Many thanks, Paul :'(
digbydo Posted October 18, 2006 Posted October 18, 2006 check your file: catalog/includes/classes/boxes.php one-click installation.. Dave's info
martinstan Posted October 18, 2006 Posted October 18, 2006 What editor are you using. In Dreamweaver I would do a sitewide search for the word 'categories' in the source code and elimate one by one. Martin
digbydo Posted October 18, 2006 Posted October 18, 2006 In Notepad I searched for your categories from the View Source <!-- start categorybox //--> <table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td width="100%" height="14" class="infoBoxHeading"><a href="http://www.mellow-days.co.uk/all_products.php" class="headerNavigation">Categories</a><br></td> <td height="14" class="infoBoxHeading" nowrap><img src="images/pixel_trans.gif" width="11" height="14" border="0" alt=""></td> </tr> </table> <table border="0" width="100%" cellspacing="0" cellpadding="1" class="infoBox"> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="3" class="infoBoxContents"> <tr> <td><img src="images/pixel_trans.gif" width="100%" height="1" border="0" alt=""></td> </tr> <tr> <td class="boxText"><a href="http://www.mellow-days.co.uk/all_products.php" class="headerNavigation">Categories</a><br></td> </tr> saw that the second was classed as boxText which is only called from classes/boxes.php in my standard install. So that was a starting place.... one-click installation.. Dave's info
atombomb96 Posted October 18, 2006 Author Posted October 18, 2006 Hi There, I did a similar thing and tried to pin it down looking the classes\boxes.php but couldn't figure it out. It seemed that it was coming from the categories tree it's generating somehow but couldn't see how. Here's the contents of that section in the includes\classes\boxes.php: function infoBoxContents($contents) { $this->table_cellpadding = '3'; $this->table_parameters = 'class="infoBoxContents"'; $info_box_contents = array(); $info_box_contents[] = array(array('text' => tep_draw_separator('pixel_trans.gif', '100%', '1'))); for ($i=0, $n=sizeof($contents); $i<$n; $i++) { $info_box_contents[] = array(array('align' => (isset($contents[$i]['align']) ? $contents[$i]['align'] : ''), 'form' => (isset($contents[$i]['form']) ? $contents[$i]['form'] : ''), 'params' => 'class="boxText"', 'text' => (isset($contents[$i]['text']) ? $contents[$i]['text'] : ''))); } $info_box_contents[] = array(array('text' => tep_draw_separator('pixel_trans.gif', '100%', '1'))); return $this->tableBox($info_box_contents); } } class infoBoxHeading extends tableBox { function infoBoxHeading($contents, $left_corner = false, $right_corner = false, $right_arrow = false) { $this->table_cellpadding = '0'; if ($left_corner == true) { $left_corner = tep_image(DIR_WS_IMAGES . 'infobox/corner_left.gif'); } else { // $left_corner = tep_image(DIR_WS_IMAGES . 'infobox/corner_right_left.gif'); } if ($right_arrow == true) { $right_arrow = '<a href="' . $right_arrow . '">' . tep_image(DIR_WS_IMAGES . 'infobox/arrow_right.gif', ICON_ARROW_RIGHT) . '</a>'; } else { $right_arrow = ''; } if ($right_corner == true) { // $right_corner = $right_arrow . tep_image(DIR_WS_IMAGES . 'infobox/corner_right.gif'); $right_corner = $right_arrow . tep_draw_separator('pixel_trans.gif', '11', '14'); } else { $right_corner = $right_arrow . tep_draw_separator('pixel_trans.gif', '11', '14'); } $info_box_contents = array(); $info_box_contents[] = array(array('params' => 'height="14" class="infoBoxHeading"', 'text' => $left_corner), array('params' => 'width="100%" height="14" class="infoBoxHeading"', 'text' => $contents[0]['text']), array('params' => 'height="14" class="infoBoxHeading" nowrap', 'text' => $right_corner)); $this->tableBox($info_box_contents, true); } } Many thanks guys, appreciate your input. :) Regards, Paul
martinstan Posted October 18, 2006 Posted October 18, 2006 I know this is a slightly rhetorical question but when did this happen and what files have you edited so far? I did have something similar once and I'm trying to rack my brains for what I did. Martin
atombomb96 Posted October 19, 2006 Author Posted October 19, 2006 I know this is a slightly rhetorical question but when did this happen and what files have you edited so far? I did have something similar once and I'm trying to rack my brains for what I did. Martin Hi Martin, The logical way would be for me to install a stock and reapply them, but it takes a while, so if this list jogs your memory I'd be eternally grateful. I appreciate what one of the other guys in the thread said about the only place the stylesheet pops up when you look at the source is the classes file, but that doesn't seem to do it, which baffles me even more. I even tried putting the classes file back to the original to no avail, checking the database and doing a site-wide search with Dreamweaver, but I still couldn't figure it. :-" I installed the following contributions: More Pics 6, New Attribute Manager, On-the-fly GD thumbnailer, Related Products, Sales Reports 2, STS 4.2 and Header Tags Controller Combo and Ultimate SEO. :) See if this list jogs your memory :) Best Regards, Paul
martinstan Posted October 19, 2006 Posted October 19, 2006 Hi Martin,The logical way would be for me to install a stock and reapply them, but it takes a while, so if this list jogs your memory I'd be eternally grateful. I appreciate what one of the other guys in the thread said about the only place the stylesheet pops up when you look at the source is the classes file, but that doesn't seem to do it, which baffles me even more. I even tried putting the classes file back to the original to no avail, checking the database and doing a site-wide search with Dreamweaver, but I still couldn't figure it. :-" I installed the following contributions: More Pics 6, New Attribute Manager, On-the-fly GD thumbnailer, Related Products, Sales Reports 2, STS 4.2 and Header Tags Controller Combo and Ultimate SEO. :) See if this list jogs your memory :) Best Regards, Paul Hi Paul I'm struggling a little with this...but I share your pain...it's really irritating. Have a look here and compare your file. This is a standard snippet from catalog/includes/boxes/categories.php // 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 .= '->'; } $categories_string .= '</a>'; if (SHOW_COUNTS == 'true') { $products_in_category = tep_count_products_in_category($counter); if ($products_in_category > 0) { $categories_string .= ' (' . $products_in_category . ')'; } } $categories_string .= '<br>'; if ($tree[$counter]['next_id'] != false) { tep_show_category($tree[$counter]['next_id']); } } ?> <!-- categories //--> <tr> <td> <?php $info_box_contents = array(); $info_box_contents[] = array('text' => BOX_HEADING_CATEGORIES); new infoBoxHeading($info_box_contents, true, false); $categories_string = ''; $tree = array(); $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 = '0' and c.categories_id = cd.categories_id and cd.language_id='" . (int)$languages_id ."' order by sort_order, cd.categories_name"); while ($categories = tep_db_fetch_array($categories_query)) { $tree[$categories['categories_id']] = array('name' => $categories['categories_name'], 'parent' => $categories['parent_id'], 'level' => 0, 'path' => $categories['categories_id'], 'next_id' => false); if (isset($parent_id)) { $tree[$parent_id]['next_id'] = $categories['categories_id']; } $parent_id = $categories['categories_id']; if (!isset($first_element)) { $first_element = $categories['categories_id']; } } I've had a look in firefox developer tools and it seems to be contained within infobox. I'm no php expert but I do have a knack (out of desperation) for tracking stuff down. Hopefully someone with far more knowledge will step in and clear this up. Cheers Martin
Recommended Posts
Archived
This topic is now archived and is closed to further replies.