It's another box header query. I know, there are lots of examples on this site and on the web but i couldn't find a specific one that suits my query, so here i am.
OK, i'm following an example in the documentation.pdf that is included with oscom. I'm trying to replace a box header with a graphic (a shopping cart) to be specific. Please see code snippets below to give you a clearer picture. I successfully create a new 'infoBoxHeadingShopCart' class, and the cart image is visible on the site but there is one small niggle. I can't get rid of the text in the header. The text lies over my image! If i try changing the text in english.php file to:
define('BOX_HEADING_SHOPPING_CART', ''); then the header vanishes completely. Ive combatted this by defining a '.' as the text definition but i get an ugly dot on the screen! Am i missing something really simple here? Can someone assist with this?NB I'm not interested in the easy solution of
define('BOX_HEADING_SHOPPING_CART', '<img src="someimage.gif" />'); as this has it's own limitations.my adjustments:
//english.php
// shopping_cart box text in includes/boxes/shopping_cart.php
define('BOX_HEADING_SHOPPING_CART', '.');
define('BOX_SHOPPING_CART_EMPTY', '0 items');
//boxes.php
class infoBoxHeadingShopCart extends tableBox {
function infoBoxHeadingShopCart($contents) {
$this->table_cellpadding = '0';
$info_box_contents = array();
$info_box_contents[] = array(array('params' => 'width="100%" class="infoBoxHeadingShopCart"',
'text' => $contents[0]['text']));
$this->tableBox($info_box_contents, true);
}
}
?>
//stylesheet
TD.infoBoxHeadingShopCart {
background: #fffff;
background-image: url('images/cart.jpg');
background-repeat: no-repeat;
}
//shopping_cart.php
<?php
$info_box_contents = array();
$info_box_contents[] = array('text' => BOX_HEADING_SHOPPING_CART);
new infoBoxHeadingShopCart($info_box_contents, true, true, tep_href_link(FILENAME_SHOPPING_CART));














