Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

removed the corner :)


coldclimber

Recommended Posts

Posted

I have maneged to get rid of the corners in the columns i am just stuck with this little problem I have a number 1 in side it now i i dont know where to find it here is the source code i pulled form it see the line in red can anyone tell me where to delete this thanks you can see this at http://www.coldclimbs.co.uk/catalog/

 

 

 

<!-- body //-->

<table border="0" width="100%" cellspacing="3" cellpadding="3">

<tr>

<td width="125" valign="top"><table border="0" width="125" cellspacing="0" cellpadding="2">

<!-- left_navigation //-->

<!-- categories //-->

<tr>

<td>

<table border="0" width="100%" cellspacing="0" cellpadding="0">

<tr>

 

<td height="14" class="infoBoxHeading">1</td>

 

<td width="100%" height="14" class="infoBoxHeading"><img src="images/categories.gif"></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">

Climb to Live, Live to climb

Posted

Here is the code for the boxes.php

 

<?php

/*

$Id: boxes.php,v 1.3 2003/09/30 16:32:45 serg Exp $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2003 osCommerce

 

Released under the GNU General Public License

*/

 

class tableBox {

var $table_border = '0';

var $table_width = '100%';

var $table_cellspacing = '0';

var $table_cellpadding = '2';

var $table_parameters = '';

var $table_row_parameters = '';

var $table_data_parameters = '';

 

// class constructor

function tableBox($contents, $direct_output = false) {

$tableBox_string = '<table border="' . tep_output_string($this->table_border) . '" width="' . tep_output_string($this->table_width) . '" cellspacing="' . tep_output_string($this->table_cellspacing) . '" cellpadding="' . tep_output_string($this->table_cellpadding) . '"';

if (tep_not_null($this->table_parameters)) $tableBox_string .= ' ' . $this->table_parameters;

$tableBox_string .= '>' . "\n";

 

for ($i=0, $n=sizeof($contents); $i<$n; $i++) {

if (isset($contents[$i]['form']) && tep_not_null($contents[$i]['form'])) $tableBox_string .= $contents[$i]['form'] . "\n";

$tableBox_string .= ' <tr';

if (tep_not_null($this->table_row_parameters)) $tableBox_string .= ' ' . $this->table_row_parameters;

if (isset($contents[$i]['params']) && tep_not_null($contents[$i]['params'])) $tableBox_string .= ' ' . $contents[$i]['params'];

$tableBox_string .= '>' . "\n";

 

if (isset($contents[$i][0]) && is_array($contents[$i][0])) {

for ($x=0, $n2=sizeof($contents[$i]); $x<$n2; $x++) {

if (isset($contents[$i][$x]['text']) && tep_not_null($contents[$i][$x]['text'])) {

$tableBox_string .= ' <td';

if (isset($contents[$i][$x]['align']) && tep_not_null($contents[$i][$x]['align'])) $tableBox_string .= ' align="' . tep_output_string($contents[$i][$x]['align']) . '"';

if (isset($contents[$i][$x]['params']) && tep_not_null($contents[$i][$x]['params'])) {

$tableBox_string .= ' ' . $contents[$i][$x]['params'];

} elseif (tep_not_null($this->table_data_parameters)) {

$tableBox_string .= ' ' . $this->table_data_parameters;

}

$tableBox_string .= '>';

if (isset($contents[$i][$x]['form']) && tep_not_null($contents[$i][$x]['form'])) $tableBox_string .= $contents[$i][$x]['form'];

$tableBox_string .= $contents[$i][$x]['text'];

if (isset($contents[$i][$x]['form']) && tep_not_null($contents[$i][$x]['form'])) $tableBox_string .= '</form>';

$tableBox_string .= '</td>' . "\n";

}

}

} else {

$tableBox_string .= ' <td';

if (isset($contents[$i]['align']) && tep_not_null($contents[$i]['align'])) $tableBox_string .= ' align="' . tep_output_string($contents[$i]['align']) . '"';

if (isset($contents[$i]['params']) && tep_not_null($contents[$i]['params'])) {

$tableBox_string .= ' ' . $contents[$i]['params'];

} elseif (tep_not_null($this->table_data_parameters)) {

$tableBox_string .= ' ' . $this->table_data_parameters;

}

$tableBox_string .= '>' . $contents[$i]['text'] . '</td>' . "\n";

}

 

$tableBox_string .= ' </tr>' . "\n";

if (isset($contents[$i]['form']) && tep_not_null($contents[$i]['form'])) $tableBox_string .= '</form>' . "\n";

}

 

$tableBox_string .= '</table>' . "\n";

 

if ($direct_output == true) echo $tableBox_string;

 

return $tableBox_string;

}

}

 

class infoBox extends tableBox {

function infoBox($contents) {

$info_box_contents = array();

$info_box_contents[] = array('text' => $this->infoBoxContents($contents));

$this->table_cellpadding = '1';

$this->table_parameters = 'class="infoBox"';

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

}

 

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';

 

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

}

}

 

class contentBox extends tableBox {

function contentBox($contents) {

$info_box_contents = array();

$info_box_contents[] = array('text' => $this->contentBoxContents($contents));

$this->table_cellpadding = '1';

$this->table_parameters = 'class="infoBox"';

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

}

 

function contentBoxContents($contents) {

$this->table_cellpadding = '4';

$this->table_parameters = 'class="infoBoxContents"';

return $this->tableBox($contents);

}

}

 

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

}

}

 

class errorBox extends tableBox {

function errorBox($contents) {

$this->table_data_parameters = 'class="errorBox"';

$this->tableBox($contents, true);

}

}

 

class productListingBox extends tableBox {

function productListingBox($contents) {

$this->table_parameters = 'class="productListing"';

$this->tableBox($contents, true);

}

}

?>

Climb to Live, Live to climb

Posted

Paste your code from includes/boxes/shopping_cart.php & categories.php

Posted

this is catagories.php ( but i dont think i have adeted this as i have used beyond compare to compare the origonal woth this one but feel free to check)

 

 

<?php

/*

$Id: categories.php,v 1.3 2003/09/30 16:32:51 serg Exp $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2003 osCommerce

 

Released under the GNU General Public License

*/

 

function tep_show_category($counter) {

global $tree, $categories_string, $cPath_array;

 

for ($i=0; $i<$tree[$counter]['level']; $i++) {

$categories_string .= "  ";

}

 

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

 

if ($tree[$counter]['parent'] == 0) {

$cPath_new = 'cPath=' . $counter;

} else {

$cPath_new = 'cPath=' . $tree[$counter]['path'];

}

 

$categories_string .= tep_href_link(FILENAME_DEFAULT, $cPath_new) . '">';

 

if (isset($cPath_array) && in_array($counter, $cPath_array)) {

$categories_string .= '<b>';

}

 

// 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'];

}

}

 

//------------------------

if (tep_not_null($cPath)) {

$new_path = '';

reset($cPath_array);

while (list($key, $value) = each($cPath_array)) {

unset($parent_id);

unset($first_id);

$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 = '" . (int)$value . "' and c.categories_id = cd.categories_id and cd.language_id='" . (int)$languages_id ."' order by sort_order, cd.categories_name");

if (tep_db_num_rows($categories_query)) {

$new_path .= $value;

while ($row = tep_db_fetch_array($categories_query)) {

$tree[$row['categories_id']] = array('name' => $row['categories_name'],

'parent' => $row['parent_id'],

'level' => $key+1,

'path' => $new_path . '_' . $row['categories_id'],

'next_id' => false);

 

if (isset($parent_id)) {

$tree[$parent_id]['next_id'] = $row['categories_id'];

}

 

$parent_id = $row['categories_id'];

 

if (!isset($first_id)) {

$first_id = $row['categories_id'];

}

 

$last_id = $row['categories_id'];

}

$tree[$last_id]['next_id'] = $tree[$value]['next_id'];

$tree[$value]['next_id'] = $first_id;

$new_path .= '_';

} else {

break;

}

}

}

tep_show_category($first_element);

 

$info_box_contents = array();

$info_box_contents[] = array('text' => $categories_string);

 

new infoBox($info_box_contents);

?>

</td>

</tr>

<!-- categories_eof //-->

Climb to Live, Live to climb

Posted

And this is shopping cart php

 

 

<?php

/*

$Id: shopping_cart.php,v 1.3 2003/09/30 16:32:51 serg Exp $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2003 osCommerce

 

Released under the GNU General Public License

*/

?>

<!-- shopping_cart //-->

<tr>

<td>

<?php

$info_box_contents = array();

$info_box_contents[] = array('text' => BOX_HEADING_SHOPPING_CART);

 

new infoBoxHeading($info_box_contents, false, true, tep_href_link(FILENAME_SHOPPING_CART));

 

$cart_contents_string = '';

if ($cart->count_contents() > 0) {

$cart_contents_string = '<table border="0" width="100%" cellspacing="0" cellpadding="0">';

$products = $cart->get_products();

for ($i=0, $n=sizeof($products); $i<$n; $i++) {

$cart_contents_string .= '<tr><td align="right" valign="top" class="infoBoxContents">';

 

if ((tep_session_is_registered('new_products_id_in_cart')) && ($new_products_id_in_cart == $products[$i]['id'])) {

$cart_contents_string .= '<span class="newItemInCart">';

} else {

$cart_contents_string .= '<span class="infoBoxContents">';

}

 

$cart_contents_string .= $products[$i]['quantity'] . ' x </span></td><td valign="top" class="infoBoxContents"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products[$i]['id']) . '">';

 

if ((tep_session_is_registered('new_products_id_in_cart')) && ($new_products_id_in_cart == $products[$i]['id'])) {

$cart_contents_string .= '<span class="newItemInCart">';

} else {

$cart_contents_string .= '<span class="infoBoxContents">';

}

 

$cart_contents_string .= $products[$i]['name'] . '</span></a></td></tr>';

 

if ((tep_session_is_registered('new_products_id_in_cart')) && ($new_products_id_in_cart == $products[$i]['id'])) {

tep_session_unregister('new_products_id_in_cart');

}

}

$cart_contents_string .= '</table>';

} else {

$cart_contents_string .= BOX_SHOPPING_CART_EMPTY;

}

 

$info_box_contents = array();

$info_box_contents[] = array('text' => $cart_contents_string);

 

if ($cart->count_contents() > 0) {

$info_box_contents[] = array('text' => tep_draw_separator());

$info_box_contents[] = array('align' => 'right',

'text' => $currencies->format($cart->show_total()));

}

 

new infoBox($info_box_contents);

?>

</td>

</tr>

<!-- shopping_cart_eof //-->

Climb to Live, Live to climb

Posted

<td height="14" class="infoBoxHeading">1</td>

 

This line is part of the top of each infoBox. If you want to remove it, I think you'll have to look at the infoBox construction code, not the code for an individual infoBox. I'm not sure where that is. Let's find it.

 

-jared

Posted

Seems to be in catalog/includes/classes/boxes.php .

 

-jared

Posted

I'd have pointed it out, had I seen exactly where it was. At the moment, I have a 3 year old son and 1 year old son destroying the house. I can concentrate for a minute or so at a time, but that's about it.

 

I'll try and find it later, if Bobby doesn't beat me to it. :)

 

FWIW, what I usually do to find things like that, and avoid thinking too much, is to insert little "jared" comments into different parts of the code, then see where they show up in the infobox. Sometimes that helps me find things quicker without having to think them through all the way.

 

Give it a shot.

 

-jared

Posted

In includes/classes/boxes.php this:

 class infoBoxHeading extends tableBox {
function infoBoxHeading($contents, $left_corner = false, $right_corner = false, $right_arrow = false) {
$this->table_cellpadding = '0';

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

...should be like this:

  class infoBoxHeading extends tableBox {
   function infoBoxHeading($contents, $left_corner = true, $right_corner = true, $right_arrow = false) {
     $this->table_cellpadding = '0';
  if ($right_arrow == true) $this->table_row_parameters = 'onclick="window.location=\''.$right_arrow.'\'"' . ' onmouseover="this.style.cursor=\'pointer\'"';

     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');
     } 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);
   }
 }

Do you have a template system or a CRE loaded installed?

Posted

just tried that and it took me back to where is was 2 hours ago.

 

as i say the left column is great now just triend to work on the right

Climb to Live, Live to climb

Posted

Restore the contents to their original code...

 

Don't make changes to the class unless you know what you're doing. It just mucks it up in other places. All presentation modifications should be done via CSS stylesheet.

Archived

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

×
×
  • Create New...