Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How to change the corners of the "New Products"


elect

Recommended Posts

Posted

I know that the corners of infoboxes are changed by finding this line new infoBoxHeadingSearch($info_box_contents, true, false);. I can find this line in every page that is in folder .../includes/boxes. The problem is the there is no new_products pages in boxes folder...this page only exists in includes/modules but I can't find the infoBoxHeadingSearch($info_box_contents, true, false); in that page. So where do I go and chage the corners for the New Product?

 

Thanks for your help,

Elect

Posted

The New Products box is a different type; it's a contentBox instead of an infoBox. The easiest way to change it is to change the definition of the box type in includes/classes/boxes.php. Find this code near line 153:

  class contentBoxHeading extends tableBox {
   function contentBoxHeading($contents) {
     $this->table_width = '100%';
     $this->table_cellpadding = '0';

     $info_box_contents = array();
     $info_box_contents[] = array(array('params' => 'height="14" class="infoBoxHeading"',
                                        'text' => tep_image(DIR_WS_IMAGES . 'infobox/corner_left.gif')),
                                  array('params' => 'height="14" class="infoBoxHeading" width="100%"',
                                        'text' => $contents[0]['text']),
                                  array('params' => 'height="14" class="infoBoxHeading"',
                                        'text' => tep_image(DIR_WS_IMAGES . 'infobox/corner_right_left.gif')));

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

infobox/corner_left.gif is the rounded upper left corner, infobox/corner_right.gif is used for the rounded upper right, and infobox/corner_right_left.gif is the square corner. Change them to suit your needs.

 

Be warned: this will change every box that uses this definition. That may not be a problem for you. If you need to change only this box, then the mod will have to be made dynamic and the values passed to the function. A lot more work if you don't need it.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Archived

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

×
×
  • Create New...