Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Removing Rounded Corners - Solved


Brunswick

Recommended Posts

Hi,

 

For all you people who like me have gone mad trying to get rid of the round and square corners on the box headings, especially for that pesky one, "New Products...", here's what finally worked for me. As you may know, osCommerce puts little blocks on either end of the box headers which can be either square or rounded. To eliminate them completely go to catalog/includes/classes/boxes.php and locate the following code:

 

$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));

and replace it with:

 

$info_box_contents[] = array(array('params' => 'with="100%" height="14"
class="infoBoxHeading"', 'text' => $contents[0]['text']));

To reduce the chance of screw-ups I commented out the offending code rather than removing it. That way you can go back to the original more easily. (Note: To comment out a block of code in PHP you have to use /* ... */ instead of <!-- ... -->)

 

Anyway, this took care of all the boxes on the sides but did not fix the "New Products..." in the middle. Then I finally noticed there was a second instance of the same code further down (no idea why!) and when I applied the same fix to it, it "magically" fixed the middle box heading.

 

When you remove the blocks it does move your heading text all the way to the left. There are different ways to fix that but the easiest is to find the following code in catalog/stylesheet.css:

 

TD.infoBoxHeading {
 font-family: Verdana, Arial, sans-serif;
 font-size: 10px;
 font-weight: bold;
 background: #ffa500;
 color: #ffffff;
}

and add the line "text-indent: 6px;" like so:

 

TD.infoBoxHeading {
 font-family: Verdana, Arial, sans-serif;
 font-size: 10px;
 font-weight: bold;
 background: #ffa500;
 color: #ffffff;
 text-indent: 6px;
}

 

You can make the number higher or lower to increase or decrease the spacing.

 

I hope this has helped someone. Let me know. :)

 

-Hank

Link to comment
Share on other sites

  • 1 month later...
Hi,

 

For all you people who like me have gone mad trying to get rid of the round and square corners on the box headings, especially for that pesky one, "New Products...", here's what finally worked for me. As you may know, osCommerce puts little blocks on either end of the box headers which can be either square or rounded. To eliminate them completely go to catalog/includes/classes/boxes.php and locate the following code:

 

$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));

and replace it with:

 

$info_box_contents[] = array(array('params' => 'with="100%" height="14"
class="infoBoxHeading"', 'text' => $contents[0]['text']));

To reduce the chance of screw-ups I commented out the offending code rather than removing it. That way you can go back to the original more easily. (Note: To comment out a block of code in PHP you have to use /* ... */ instead of <!-- ... -->)

 

Anyway, this took care of all the boxes on the sides but did not fix the "New Products..." in the middle. Then I finally noticed there was a second instance of the same code further down (no idea why!) and when I applied the same fix to it, it "magically" fixed the middle box heading.

 

When you remove the blocks it does move your heading text all the way to the left. There are different ways to fix that but the easiest is to find the following code in catalog/stylesheet.css:

 

TD.infoBoxHeading {
 font-family: Verdana, Arial, sans-serif;
 font-size: 10px;
 font-weight: bold;
 background: #ffa500;
 color: #ffffff;
}

and add the line "text-indent: 6px;" like so:

 

TD.infoBoxHeading {
 font-family: Verdana, Arial, sans-serif;
 font-size: 10px;
 font-weight: bold;
 background: #ffa500;
 color: #ffffff;
 text-indent: 6px;
}

 

You can make the number higher or lower to increase or decrease the spacing.

 

I hope this has helped someone. Let me know. :)

 

-Hank

 

Hello Hank,

thank you for this script it was easy to use and worked as prescribed by the doctor.

:thumbsup:

 

cheers,

Aaron

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...