Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

category List Box


Guest

Recommended Posts

Can some one tell me how to remove the border around the category list box. I think it is done in the stylesheet.css file some where, and some how have no idea. I don't want to remove all the borders in all the boxes just the category box.

Link to comment
Share on other sites

it is controled by the catalog/includes/classes/boxes.php

 

and is set for all the infoboxes so to remove for just one box you would need to create a new class for that box and then call the class in catalog/includes/boxes/categories.php

 

this is the code for the catalog/includes/classes/boxes.php

//New CategoriesBox Class
 class CategoriesBox extends tableBox {
   function CategoriesBox($contents) {
     $info_box_contents = array();
     $info_box_contents[] = array('text' => $this->CategoriesBoxContents($contents));
     $this->table_cellpadding = '0';
     $this->table_parameters = 'class="CategoriesBox"';
     $this->tableBox($info_box_contents, true);
   }

   function CategoriesBoxContents($contents) {
     $this->table_cellpadding = '3';
     $this->table_parameters = 'class="CategoriesBoxContents"';
     $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="CategoriesBoxContents"',
                                          '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 CategoriesBoxHeading extends tableBox {
   function CategoriesBoxHeading($contents, $left_corner = true, $right_corner = true, $right_arrow = false) {
     $this->table_cellpadding = '0';

     if ($left_corner == true) {
       $left_corner = tep_image(DIR_WS_IMAGES . 'CategoriesBox/corner_left.gif');
     } else {
       $left_corner = tep_image(DIR_WS_IMAGES . 'CategoriesBox/corner_right_left.gif');
     }
     if ($right_arrow == true) {
       $right_arrow = '<a href="' . $right_arrow . '">' . tep_image(DIR_WS_IMAGES . 'CategoriesBox/arrow_right.gif', ICON_ARROW_RIGHT) . '</a>';
     } else {
       $right_arrow = '';
     }
     if ($right_corner == true) {
       $right_corner = $right_arrow . tep_image(DIR_WS_IMAGES . 'CategoriesBox/corner_right.gif');
     } 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="CategoriesBoxHeading"',
                                        'text' => $left_corner),
                                  array('params' => 'width="100%" height="14" class="CategoriesBoxHeading"',
                                        'text' => $contents[0]['text']),
                                  array('params' => 'height="14" class="CategoriesBoxHeading" nowrap',
                                        'text' => $right_corner));

     $this->tableBox($info_box_contents, true);
   }
 }

 

the code for the stylesheet.css

.CategoriesBox {
 background: #b6b7cb;
}
TD.CategoriesBoxHeading {
 font-family: Verdana, Arial, sans-serif;
 font-size: 10px;
 font-weight: bold;
 background: #bbc3d3;
 color: #000000;
}
.CategoriesBoxContents {
 background: #f8f8f9;
 font-family: Verdana, Arial, sans-serif;
 font-size: 10px;
}
A.CategoriesBoxContents:hover {
 font-family: Verdana, Arial, sans-serif;
 font-style: normal;
 font-weight: bold;
 font-size: 10px;
 color: #FFA500;
 text-decoration: none;
}

 

and the code for the changes to catalog/includes/boxes/categories.php

 

  new CategoriesBoxHeading($info_box_contents, true, false);

  new CategoriesBox($info_box_contents);

No longer giving free advice. Please place deposit in meter slot provided.  Individual: [=] SME: [==] Corporation: [===]
If deposit does not fit one of the slots provided then you are asking too much! :P

Is your Osc dated try Phoenix  raising oscommerce from the ashes.

Link to comment
Share on other sites

  • 3 weeks later...

Could someone help me with this, please?

I want to change the font colors for the categories box. I did everything above, and changed the background and border colors. But it won't let me change the link colors. Even though they are set in A.CategoriesBoxContents:hover, they don't work. They seem to default to the main page link colors regardless......

Link to comment
Share on other sites

did you make the call to the styleclass in the correct file

 

links in categories box can be done in catalog/includes/boxes/categories.php

 

locate this code

 ? ?$categories_string .= '<a href="';

and change to this code

 ? ?$categories_string .= '<a class=CategoriesBoxContents href="';

No longer giving free advice. Please place deposit in meter slot provided.  Individual: [=] SME: [==] Corporation: [===]
If deposit does not fit one of the slots provided then you are asking too much! :P

Is your Osc dated try Phoenix  raising oscommerce from the ashes.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...