Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

I have no idea what I did....


Guest

Recommended Posts

I haven't a clue as how I did this, but was adjusting my infobox widths, and suddenly the line to the right is longer than the infobox. So, I uploaded my back up thinking that would fix the error but it's still there. I've looked and looked and have not a clue as to what is causing this.

 

Here the infobox code....

 

<?php
/*
 $id: Great Categories v2.1 2005/07/09 14:00:00 willross Exp $
 http://www.palaia.com/ujp/ - [email protected]
 *** For use with standard install of osCommerce 2.2MS2+

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2005 osCommerce

 Released under the GNU General Public License
*/
 function tep_show_category($counter) {
global $tree, $categories_string, $cPath_array, $aa;

for ($a=0; $a<$tree[$counter]['level']; $a++) {
//	  $categories_string .= "  ";
}   
//category start
  if ($tree[$counter]['level'] == 0)
{
	if ($aa == 1)
	{
  $categories_string .= '<img src="images/pixel_trans.gif" border="0" alt="" width="100%" height="2"><br><img src="images/pixel_trans.gif" border="0" alt="" width="100%" height="2">';

	}
	else
	{$aa=1;}
}
if ($tree[$counter]['level'] == 0) {$categories_string .= '<div id="topcat">';}
if ($tree[$counter]['level'] == 1) {$categories_string .= '<div id="secondcat">';}
if ($tree[$counter]['level'] == 2) {$categories_string .= '<div id="thirdcat">';}
if ($tree[$counter]['level'] == 3) {$categories_string .= '<div id="fourthcat">';}
if ($tree[$counter]['level'] == 4) {$categories_string .= '<div id="fifthcat">';}





$categories_string .= '<a';
if ( ($cPath_array) && (@in_array($counter, $cPath_array)) ) {
  $categories_string .= ' class="activelink"';
}

if ($tree[$counter]['parent'] == 0) {
  $cPath_new = 'cPath=' . $counter;
} else {
  $cPath_new = 'cPath=' . $tree[$counter]['path'];
}

$categories_string .= ' href="'.tep_href_link(FILENAME_DEFAULT, $cPath_new);
$categories_string .= '">';
// display category name
if (tep_has_category_subcategories($counter) || $tree[$counter]['level'] == 0) {
	if ( ($cPath_array) && (@in_array($counter, $cPath_array)) ) {
	$categories_string .= '<span class="catwithsubs">'.tep_image(DIR_WS_IMAGES . 'categories/arrow_down.gif', '', '9', '9') . "</span>";
	} else {
	$categories_string .= '<span class="catwithsubs">'.tep_image(DIR_WS_IMAGES . 'categories/arrow_right.gif', '', '9', '9') . "</span>";
	}
} else {
$categories_string .= '<span class="catwithnosubs">' .tep_image(DIR_WS_IMAGES . 'categories/arrow_bullet.gif', 'nokta', '9', '9') . "</span>";
}



//category name
$categories_string .= $tree[$counter]['name'];



if ( ($cPath_array) && (@in_array($counter, $cPath_array)) ) {
  //end of active link
$categories_string .= '';
}

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>';
  $categories_string .= '</div>';

if ($tree[$counter]['next_id']) {
  tep_show_category($tree[$counter]['next_id']);
}
 }
?>
<!-- categories //-->
	  <tr>
		<td>
<TABLE WIDTH=201 BORDER=0 CELLPADDING=0 CELLSPACING=0>
<TR>
	<TD COLSPAN=3>
		<IMG SRC="images/boxes/table_footer.gif" WIDTH=201 HEIGHT=23></TD>
</TR>
<TR>
<td>

<?php
 $categories_string = '<div id="thecategories">';

 $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='" . $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 ($cPath) {
$cPath_array = split('_', $cPath);
reset($cPath_array);
while (list($key, $value) = each($cPath_array)) {
  $new_path .= $value;
  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 = '" . $value . "' and c.categories_id = cd.categories_id and cd.language_id='" . $languages_id ."' order by sort_order, cd.categories_name");
  $category_check = tep_db_num_rows($categories_query);
  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'];
  }
  if ($category_check != 0) {
	$tree[$last_id]['next_id'] = $tree[$value]['next_id'];
	$tree[$value]['next_id'] = $first_id;
  }

		 $new_path .= '_';
}
 }

 tep_show_category($first_element);
 $info_box_contents = array();
 $info_box_contents[] = array('align' => 'left',
						   'text'  => $categories_string.'</div>');
 new infoBox($info_box_contents);
?>

		</td>
	  </tr>
<!-- categories_eof //-->

<!-- search //-->
<tr>
<td>

<?php
 $hide = tep_hide_session_id();
 $info_box_contents = array();
 $info_box_contents[] = array('form'  => '<form name="quick_find" method="get" action="' . tep_href_link(FILENAME_ADVANCED_SEARCH_RESULT, '', 'NONSSL', false) . '">',
						   'align' => 'center',
						   'text'  => $hide . '<input type="text" name="keywords" size="10" maxlength="30" value="' . htmlspecialchars(StripSlashes(@$HTTP_GET_VARS["keywords"])) . '" style="width: ' . (BOX_WIDTH+1) . 'px"> ' . tep_image_submit('button_quick_find.gif', BOX_HEADING_SEARCH) . '<br>' . BOX_SEARCH_TEXT . '<br><a href="' . tep_href_link(FILENAME_ADVANCED_SEARCH) . '"><b>' . BOX_SEARCH_ADVANCED_SEARCH . '</b></a>'
						  );
 new infoBox($info_box_contents);
?>

</td>
</tr>
<!-- search_eof //-->

<!-- free catalog //-->
	  <tr>
		<td>

<?php




 $info_box_contents = array();
 $info_box_contents[] = array('align' => 'center', 'text' => '<a href="' . tep_href_link(FILENAME_FREE_CATALOG, '', 'SSL') . '">' . tep_image(DIR_WS_IMAGES . 'icon_requestcatalog.jpg') . '</a><br /><a href="' . tep_href_link(FILENAME_FREE_CATALOG, '', 'SSL') . '">' . BOX_INFORMATION_FREE_CATALOG . '</a><br />');

 new infoBox($info_box_contents);
?>

</td>
</tr>
<!-- free catalog_eof //-->

<?php
/*
 $Id: shopping_cart.php,v 1.16 2002/06/11 19:49:52 hpdl Exp $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2001 osCommerce

 Released under the GNU General Public License
*/
?>
<!-- shopping_cart //-->

<TR>
<td>
<?php
 $cart_contents_string = '';
 if ($cart->count_contents() > 0) {
$cart_contents_string = '<table border="0" width="100%" cellspacing="0" cellpadding="0">';
$products = $cart->get_products(); // $products[$i]['id'] .. $products[$i]['name'] .. $products[$i]['quantity']
for ($i=0; $i<sizeof($products); $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">'; // highlight product quantity
  } else {
	$cart_contents_string .= '<span class="infoBoxContents">';
  }

  if ($products[$i]['carrot'] == "1")
{
$cart_contents_string .= $products[$i]['quantity'] . ' x </span></td><td valign="top" class="infoBoxContents">';
} else {
$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">'; // highlight product name
  } else {
	$cart_contents_string .= '<span class="infoBoxContents">';
  }

  if ($products[$i]['carrot'] == "1")
{	
$cart_contents_string .= $products[$i]['name'] . '</span></td></tr>';
} else {
$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_empty = 1;
$cart_contents_string .= BOX_SHOPPING_CART_EMPTY;
 }

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

 if (!$cart_empty) {
$info_box_contents[] = array('align' => 'left',
							 '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 //-->
<!-- estimated_shipping BOF//-->

<tr>
		<td>

<?php

//// BEGIN:  Added for Estimated Shipping v1.0
//   include estimated shipping functions
require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_ESTIMATED_SHIPPING);
require(DIR_WS_FUNCTIONS . 'estimated_shipping_functions.php');
//// END:  Added for Estimated Shipping v1.000

if ($cart->count_contents() > 0 && (((substr(basename($PHP_SELF), 0, 8) != 'checkout') && substr(basename($PHP_SELF), 0, 7) != 'account'))) {
	$info_box_contents = array();
	$info_box_contents[] = array('align' => 'left',
								 'text'  => TABLE_HEADING_ESTIMATED_SHIPPING);
//	new estimatedshippingBoxHeading($info_box_contents, true, false);

	if (tep_session_is_registered('country')) {
		if (isset($HTTP_POST_VARS['country'])) {
			$country = $HTTP_POST_VARS['country'];
		}
	}

	if ((tep_session_is_registered('customer_id')) && (!tep_not_null($country))) {
		$country = $customer_country_id;
	} else {
		if (!tep_not_null($country)) {
			$country = STORE_COUNTRY;
		}
	}

	$info_box_contents = array();
	$info_box_contents[] = array('form' => tep_draw_form('estimated_shipping', tep_href_link(basename($PHP_SELF), '',$request_type, false), 'post') .  tep_hide_session_id(),
								 'align' => 'left',
								 'text' => TEXT_EXPLAIN_ESTIMATED_SHIPPING . '<BR><CENTER>' .  TEXT_COUNTRY_TO_SHIP_TO . '</CENTER><TABLE WIDTH="' . BOX_WIDTH . '"><TR><TH>' . tep_get_country_list('country', $country, 'onChange="this.form.submit();" style="width:' . (BOX_WIDTH+0) . 'px"')  . '</TH><TR></TABLE>' . tep_get_estimated_shipping_quotes($country,  $HTTP_GET_VARS['action'],$customer_country_id));

	new estimatedshippingBox($info_box_contents);
} else {
	if (tep_session_is_registered('country')) {
		tep_session_unregister('country');
	}

}
?>



</td></tr>
<!-- estimated_shipping EOF //-->

<!-- information //-->
<tr>
<td>
<?php
 $info_box_contents = array();
 $info_box_contents[] = array('align' => 'left',
						   'text'  => '<a href="' . tep_href_link(FILENAME_SHIPPING, '', 'NONSSL') . '">' . BOX_INFORMATION_SHIPPING . '</a><br>' .
									  '<a href="' . tep_href_link(FILENAME_PRIVACY, '', 'NONSSL') . '">' . BOX_INFORMATION_PRIVACY . '</a><br>' .
									 '<a href="' . tep_href_link(FILENAME_LINKS) . '">' . BOX_INFORMATION_LINKS . '</a><br>' . // VJ Links Manager v1.00 added
									  '<a href="' . tep_href_link(FILENAME_CONTACT_US, '', 'NONSSL') . '">' . BOX_INFORMATION_CONTACT . '</a>'
						  );
 new infoBox($info_box_contents);
?>

</td>
</tr>
<!-- information_eof //-->


<?php
/*
 $Id: number.php,v 1.6 2003/02/10 22:31:00 hpdl Exp $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/
?>
<!-- number //-->
	  <tr>
		<td>


<?php


 $info_box_contents = array();
 $info_box_contents[] = array('text' => 'Monday - Friday<BR> 9:00am - 4:00pm Central <BR>1-888-824-3872 <BR> [email protected]');


 new infoBox($info_box_contents);
?>
</TD>
</TR>
<TR>
	<TD COLSPAN=3>
		<IMG SRC="images/boxes/table_footer1.gif" WIDTH=201 HEIGHT=23></TD>
</TR>
</TABLE>

		</td>
	  </tr>
</td>
</tr>
<!-- number_eof //-->

 

to see the extended line on my site,

 

http://www.angelic-giftstore.com

 

You should notice it right off, I mean, I guess it doesn't look to bad there but I really don't want it :(

Link to comment
Share on other sites

Well before I slink off with egg on my face lol, thank you so much spax. I think I need a break, 2nd time today I've done a really silly mistake. My eyes are crossed from looking at all different pages of coding trying to see what I did wrong! I would have never thought to recheck my image. Thanks again :D

Link to comment
Share on other sites

No worries, we've all done it. :D

 

When it gets to the stage where you can't see the wood for the trees, you need to close it down, take a walk to clear your head and then go back to it. Then everything becomes obvious.....sometimes! :blink:

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...