Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Width error...I can seem to find?


emailanj

Recommended Posts

I am getting this error on my account_history_info page of my cart:

 

< table border="0" width="99%" cellspacing="0" cellpadding="0" align="center"> < tr> < td width="150" valign="top">< !-- left_navigation //-->

 

It was at 770 I just changed it to 99% so I could see changes.

 

My page will not move nor can I get rid of the error. Please help...Something so simple is causing me to go to the nut house!!!

 

Thanks for any and all help

anj

Link to comment
Share on other sites

the box width should be controlled by BOX_WIDTH. Did you change that in account_history_info.php?

 

Should be like this:

<td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">

Link to comment
Share on other sites

Thanks for your response...

 

No I did not change the box width in Account_history_info.php, But I did change it in application_top.php to 150. I changed it back to the default 125 for test purpose to see if it would fix the problem (no such luck) It looks like this now:

 

// include the list of project filenames
 require(DIR_WS_INCLUDES . 'filenames.php');

// include the list of project database tables
 require(DIR_WS_INCLUDES . 'database_tables.php');

// customization for the design layout
 define('BOX_WIDTH', 125); // how wide the boxes should be in pixels (default: 125)

// include the database functions
 require(DIR_WS_FUNCTIONS . 'database.php');

 

Which changed the error to look like this:

< table border="0" width="99%" cellspacing="0" cellpadding="0" align="center"> < tr> < td width="125" valign="top">< !-- left_navigation //-->

 

My account_history_info.php looks like this:

<?php
/*
 $Id: account_history_info.php,v 6.1 2005/06/05 23:03:52 PopTheTop Exp $

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

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/

// BEGIN Fancier Order Details & Print Invoice

 require('includes/application_top.php');

 if (!tep_session_is_registered('customer_id')) {
   $navigation->set_snapshot();
   tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL'));
 }

 if (!isset($HTTP_GET_VARS['order_id']) || (isset($HTTP_GET_VARS['order_id']) && !is_numeric($HTTP_GET_VARS['order_id']))) {
   tep_redirect(tep_href_link(FILENAME_ACCOUNT_HISTORY, '', 'SSL'));
 }
 
 $customer_info_query = tep_db_query("select customers_id from " . TABLE_ORDERS . " where orders_id = '". (int)$HTTP_GET_VARS['order_id'] . "'");
 $customer_info = tep_db_fetch_array($customer_info_query);
 if ($customer_info['customers_id'] != $customer_id) {
   tep_redirect(tep_href_link(FILENAME_ACCOUNT_HISTORY, '', 'SSL'));
 }

 require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_ACCOUNT_HISTORY_INFO);

 $breadcrumb->add(NAVBAR_TITLE_1, tep_href_link(FILENAME_ACCOUNT, '', 'SSL'));
 $breadcrumb->add(NAVBAR_TITLE_2, tep_href_link(FILENAME_ACCOUNT_HISTORY, '', 'SSL'));
 $breadcrumb->add(sprintf(NAVBAR_TITLE_3, $HTTP_GET_VARS['order_id']), tep_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id=' . $HTTP_GET_VARS['order_id'], 'SSL'));

 require(DIR_WS_CLASSES . 'order.php');
 $order = new order($HTTP_GET_VARS['order_id']);
?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php echo HTML_PARAMS; ?>>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
<title><?php echo STORE_NAME; ?> - <?php echo HEADING_TITLE; ?></title>
<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
<link rel="stylesheet" type="text/css" href="stylesheet.css">
<script language="javascript">
<!--
function popupPrintReceipt(url) {
 window.open(url,'popupPrintReceipt','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,re
sizable=yes,copyhistory=no,width=750')
}
//-->
</script>
</head>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF">
<!-- header //-->
<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
<!-- header_eof //-->

<!-- body //-->
< table border="0" width="99%" cellspacing="0" cellpadding="0" align="center">
< tr>
< td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
< !-- left_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>
<!-- left_navigation_eof //-->
   </table></td>
<!-- body_text //-->
  <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
  <TD ALIGN="right" VALIGN="top" class="order_history_top"><?php echo HEADING_ORDER_NUMBER; ?> <?php echo $HTTP_GET_VARS['order_id']; ?><BR><?php echo tep_date_long($order->info['date_purchased']); ?></TD>
</tr>
<tr>
   <td VALIGN="top">
 <table border="0" width="100%" cellspacing="0" cellpadding="0">
	 <tr>
   <TD>
   <table width="100%" border="0" cellspacing="0" cellpadding="2">
         <tr>
     <td colspan="4">
     <table width="100%" border="0" cellspacing="0" cellpadding="2">
          <tr>
            <td width="10%"><hr size="2"></td>
            <td align="center" class="pageHeading" NOWRAP><em><b><?php echo HEADING_TITLE2; ?></b></em></td>
            <td width="100%"><hr size="2"></td>
          </tr>
         </table>
         </td>
      </tr>
      <tr>
       <td colspan="4"><?php echo tep_draw_separator('pixel_trans.gif', '100', '5'); ?></td>
      </tr>
        <tr>
         <td valign="top">
           <table width="100%" border="0" cellpadding="0" cellspacing="0">
               <tr>
                 <td width="11"><img src="images/borders/maingrey_01.gif" width="11" height="16" alt=""></td>
                 <td background="images/borders/maingrey_02.gif"><img src="images/borders/maingrey_02.gif" width="24" height="16" alt="" ></td>
                 <td width="19"><img src="images/borders/maingrey_03.gif" width="19" height="16" alt=""></td>
               </tr>
               <tr>
                 <td background="images/borders/maingrey_04.gif"><img src="images/borders/maingrey_04.gif" width="11" height="21" alt=""></td>
                 <td align="center" bgcolor="#F2F2F2">
      	 <table width="100%" border="0" cellspacing="0" cellpadding="0" class="main">
                     <tr>
                       <td align="left" valign="top" class="order_infobox_heading"><b><?php echo HEADING_BILLING_ADDRESS; ?></b></td>
                     </tr>
                     <tr>
                       <td class="order_infobox_data">    <?php echo tep_draw_separator('pixel_trans.gif', '1', '5'); ?></td>
                     </tr>
                     <tr>
                       <td class="order_infobox_data">    <?php echo tep_address_format($order->customer['format_id'], $order->customer, 1, '', '<br>    '); ?></td>
                     </tr>
                     <tr>
                       <td class="order_infobox_data">    <?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
                     </tr>
                     <tr>
                       <td class="order_infobox_data">    <?php echo $order->customer['telephone']; ?></td>
                     </tr>
                     <tr>
                       <td class="order_infobox_data">    <?php echo $order->customer['email_address']; ?></td>
                     </tr>
                     <tr>
                       <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '7'); ?></td>
                     </tr>
                   </table>
       </td>
                 <td background="images/borders/maingrey_06.gif"><img src="images/borders/maingrey_06.gif" width="19" height="21" alt=""></td>
               </tr>
               <tr>
                 <td><img src="images/borders/maingrey_07.gif" width="11" height="18" alt=""></td>
                 <td background="images/borders/maingrey_08.gif"><img src="images/borders/maingrey_08.gif" width="24" height="18" alt=""></td>
                 <td><img src="images/borders/maingrey_09.gif" width="19" height="18" alt=""></td>
               </tr>
           </table>
           </td>
             <td width="15"> </td>
           <td valign="top">
             <table width="100%" border="0" cellpadding="0" cellspacing="0">
               <tr>
                 <td width="11"><img src="images/borders/mainwhite_01.gif" width="11" height="16" alt=""></td>
                 <td background="images/borders/mainwhite_02.gif"><img src="images/borders/mainwhite_02.gif" width="24" height="16" alt=""></td>
                 <td width="19"><img src="images/borders/mainwhite_03.gif" width="19" height="16" alt=""></td>
               </tr>
               <tr>
                 <td background="images/borders/mainwhite_04.gif"><img src="images/borders/mainwhite_04.gif" width="11" height="21" alt=""></td>
                 <td align="center" bgcolor="#FFFFFF">
        <table width="100%" border="0" cellpadding="0" cellspacing="0" class="main">
                     <tr>
                       <td align="left" valign="top" class="order_infobox_heading"><b><?php echo HEADING_DELIVERY_ADDRESS; ?></b></td>
                     </tr>
                     <tr>
                       <td class="order_infobox_data">    <?php echo tep_draw_separator('pixel_trans.gif', '1', '5'); ?></td>
                     </tr>
                     <tr>
                       <td class="order_infobox_data">    <?php echo tep_address_format($order->delivery['format_id'], $order->delivery, 1, '', '<br>    '); ?></td>
                     </tr>
                     <tr>
                       <td class="order_infobox_data">    <?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
                     </tr>
                     <tr>
                       <td class="order_infobox_data">    </td>
                     </tr>
                     <tr>
                       <td class="order_infobox_data">    </td>
                     </tr>
                     <tr>
                       <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '7'); ?></td>
                     </tr>
        </table>
       </td>
                 <td background="images/borders/mainwhite_06.gif"><img src="images/borders/mainwhite_06.gif" width="19" height="21" alt=""></td>
               </tr>
               <tr>
                 <td><img src="images/borders/mainwhite_07.gif" width="11" height="18" alt=""></td>
                 <td background="images/borders/mainwhite_08.gif"><img src="images/borders/mainwhite_08.gif" width="24" height="18" alt=""></td>
                 <td><img src="images/borders/mainwhite_09.gif" width="19" height="18" alt=""></td>
               </tr>
             </table>
           </td>
        </tr>
      </table>
    </TD>
   </tr>
   <tr>
   <TD><?php echo tep_draw_separator('pixel_trans.gif', '100', '15'); ?></td>
   </tr>
   <tr>
   <TD>
           <table width="100%" border="0" cellpadding="0" cellspacing="0">
           <tr>
             <td width="2"> </td>
               <td>
           <table width="100%" border="0" cellpadding="0" cellspacing="0">
            <tr>
                <td width="11"><img src="images/borders/maingrey_01.gif" width="11" height="16" alt=""></td>
                <td background="images/borders/maingrey_02.gif"><img src="images/borders/maingrey_02.gif" width="24" height="16" alt="" ></td>
                <td width="19"><img src="images/borders/maingrey_03.gif" width="19" height="16" alt=""></td>
            </tr>
            <tr>
                <td background="images/borders/maingrey_04.gif"><img src="images/borders/maingrey_04.gif" width="11" height="21" alt=""></td>
                <td align="center" bgcolor="#F2F2F2">
    	 <table width="100%" border="0" cellpadding="0" cellspacing="0" class="main">
      	 <tr>
                <td class="order_infobox_data"> <b><?php echo HEADING_ORDER_NUMBER; ?>:</b> <?php echo $HTTP_GET_VARS['order_id']; ?><br><?php echo tep_draw_separator('pixel_trans.gif', '100', '6'); ?><br> <b><?php echo HEADING_ORDER_DATE; ?></b> <?php echo tep_date_short($order->info['date_purchased']); ?></td>
<?php 
 if (tep_not_null($order->info['cc_number'])) {
   $this->cc_card_number_less_middle_digits = substr($order->info['cc_number'], 0, 4) . str_repeat('x', (strlen($order->info['cc_number']) - 8)) . substr($order->info['cc_number'], -4);
?>
                <td align="right" class="order_infobox_data"> <b><?php echo HEADING_PAYMENT_METHOD; ?></b> <?php echo $order->info['payment_method']; ?> (<?php echo $order->info['cc_type']; ?>)<br><?php echo tep_draw_separator('pixel_trans.gif', '100%', '6'); ?><br> <b><?php echo ENTRY_PAYMENT_CC_NUMBER; ?></b> <?php echo $this->cc_card_number_less_middle_digits; ?></td>
<?php 
 } else {
?>
                <td align="right" class="order_infobox_data"> <b><?php echo HEADING_PAYMENT_METHOD; ?></b> <?php echo $order->info['payment_method']; ?> </td>
<?php 
 }
?>
             </tr>
               <tr>
              	 <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '100%', '7'); ?></td>
               </tr>
    	 </table>
    	 </td>
             <td background="images/borders/maingrey_06.gif"><img src="images/borders/maingrey_06.gif" width="19" height="21" alt=""></td>
            </tr>
            <tr>
             <td><img src="images/borders/maingrey_07.gif" width="11" height="18" alt=""></td>
             <td background="images/borders/maingrey_08.gif"><img src="images/borders/maingrey_08.gif" width="24" height="18" alt=""></td>
             <td><img src="images/borders/maingrey_09.gif" width="19" height="18" alt=""></td>
            </tr>
         </table>
               </td>
           </tr>
           </table>
   </td>
   </tr>
   <tr>
   <TD><?php echo tep_draw_separator('pixel_trans.gif', '100%', '20'); ?></td>
   </tr>
     <tr>
   <td align="center">
   <table border="0" width="99%" cellspacing="0" cellpadding="2">
      	 <tr class="product_infobox_heading_row">
           <td class="product_infobox_heading" colspan="2"> <font color="#000000"><?php echo PRODUCTS; ?></font></td>
           <td WIDTH="80" class="product_infobox_heading"><font color="#000000"><?php echo SKU_OR_MODEL; ?></font></td>
           <td WIDTH="80" class="product_infobox_heading" align="right"><font color="#000000"><?php echo UNIT; ?></font></td>
           <TD WIDTH="80" ALIGN="right" CLASS="product_infobox_heading"><font color="#000000"><?php echo TOTAL; ?></font> </TD>
      	 </tr>
<?php
   for ($i = 0, $n = sizeof($order->products); $i < $n; $i++) {
 echo '      <tr class="product_infobox_data_row">' . "\n" .
      '        <td class="product_infobox_data" valign="top" align="right">' . $order->products[$i]['qty'] . ' x</td>' . "\n" .
      '        <td class="product_infobox_data" valign="top">' . $order->products[$i]['name'];

     if (isset($order->products[$i]['attributes']) && (($k = sizeof($order->products[$i]['attributes'])) > 0)) {
       for ($j = 0; $j < $k; $j++) {
         echo '<br><nobr><small> <i> - ' . $order->products[$i]['attributes'][$j]['option'] . ': ' . $order->products[$i]['attributes'][$j]['value'];
         if ($order->products[$i]['attributes'][$j]['price'] != '0') echo ' (' . $order->products[$i]['attributes'][$j]['prefix'] . $currencies->format($order->products[$i]['attributes'][$j]['price'] * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']) . ')';
         echo '</i></small></nobr>';
       }
     }

     echo '          </td>' . "\n" .
          '          <td WIDTH="80" class="product_infobox_data" valign="top">' . $order->products[$i]['model'] . '</td>' . "\n";
     echo '          <td WIDTH="80" class="product_infobox_data" align="right" valign="top">' . $currencies->format($order->products[$i]['final_price'], true, $order->info['currency'], $order->info['currency_value']) . '</td>' . "\n" .
          '          <td WIDTH="80" class="product_infobox_data" align="right" valign="top"><b>' . $currencies->format($order->products[$i]['final_price'] * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']) . ' </b></td>' . "\n";
     echo '       	 </tr>' . "\n";
   }
?>
  	 <tr>
     <td align="right" colspan="5">
   <table border="0" cellspacing="0" cellpadding="2">
<?php
 for ($i = 0, $n = sizeof($order->totals); $i < $n; $i++) {
   echo '       	 <tr>' . "\n" .
        '          <td align="right" class="smallText">' . $order->totals[$i]['title'] . '</td>' . "\n" .
        '          <td align="right" class="smallText">' . $order->totals[$i]['text'] . '</td>' . "\n" .
        '       	 </tr>' . "\n";
 }
?>
       </table>
   </td>
    	 </tr>
     </table></td>
</tr>


<?php
 if (DOWNLOAD_ENABLED == 'true') include(DIR_WS_MODULES . 'downloads.php');
?>
     <tr>
       <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '18'); ?></td>
     </tr>
     <tr>
       <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '18'); ?></td>
     </tr>
     <tr>
    	 <TD>
        <table width="100%" border="0" cellpadding="0" cellspacing="0">
   <tr>
  	 <td width="2"> </td>
              <td>
          <table width="100%" border="0" cellpadding="0" cellspacing="0">
          <tr>
                <td width="11"><img src="images/borders/maingrey_01.gif" width="11" height="16" alt=""></td>
              <td background="images/borders/maingrey_02.gif"><img src="images/borders/maingrey_02.gif" width="24" height="16" alt="" ></td>
              <td width="19"><img src="images/borders/maingrey_03.gif" width="19" height="16" alt=""></td>
          </tr>
          <tr>
              <td background="images/borders/maingrey_04.gif"><img src="images/borders/maingrey_04.gif" width="11" height="21" alt=""></td>
              <td align="center" bgcolor="#F2F2F2">
      <table width="100%" border="0" cellpadding="0" cellspacing="0" class="main">
               <tr>
                    <td colspan="3" align="left" valign="top" class="order_infobox_heading"><b><?php echo ORDER_STATUS; ?></b></td>
               </tr>
<?php
 $statuses_query = tep_db_query("select os.orders_status_name, osh.date_added, osh.comments from " . TABLE_ORDERS_STATUS . " os, " . TABLE_ORDERS_STATUS_HISTORY . " osh where osh.orders_id = '" . (int)$HTTP_GET_VARS['order_id'] . "' and osh.orders_status_id = os.orders_status_id and os.language_id = '" . (int)$languages_id . "' order by osh.date_added");
 while ($statuses = tep_db_fetch_array($statuses_query)) {
     echo '                <tr>' . "\n";
     echo '                     <td valign="top" class="product_infobox_data" width="114"><br>    <strong>' . tep_date_short($statuses['date_added']) . '</strong></td>' . "\n";
     echo '                     <td valign="top" class="product_infobox_data" width="85"><br>' . $statuses['orders_status_name'] . '</td>' . "\n";
     echo '                     <td valign="top" class="product_infobox_data"><br>' . (empty($statuses['comments']) ? ' ' : nl2br(tep_output_string_protected($statuses['comments']))) . '</td>' . "\n";
     echo '                </tr>' . "\n";
 }
?>
               <tr>
                    <td colspan="3"><?php echo tep_draw_separator('pixel_trans.gif', '100%', '7'); ?></td>
               </tr>
      </table>
      </td>
      <td background="images/borders/maingrey_06.gif"><img src="images/borders/maingrey_06.gif" width="19" height="21" alt=""></td>
          </tr>
          <tr>
            <td><img src="images/borders/maingrey_07.gif" width="11" height="18" alt=""></td>
            <td background="images/borders/maingrey_08.gif"><img src="images/borders/maingrey_08.gif" width="24" height="18" alt=""></td>
            <td><img src="images/borders/maingrey_09.gif" width="19" height="18" alt=""></td>
          </tr>
          </table>
          </td>
   </tr>
  </table></td>
</tr>
     <tr>
       <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '25'); ?></td>
     </tr>
     <tr>
       <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
         <tr class="infoBoxContents">
           <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
             <tr>
               <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
             <td><div style="float:left"><?php echo '<a href="' . tep_href_link(FILENAME_ACCOUNT_HISTORY, tep_get_all_get_params(array('order_id')), 'SSL') . '">' . tep_image_button('button_back.gif', IMAGE_BUTTON_BACK) . '</a></div><div style=float:right>'; ?><a href="javascript:popupPrintReceipt('<?php echo tep_href_link(FILENAME_ORDERS_PRINTABLE, tep_get_all_get_params(array('order_id')) . 'order_id=' . $HTTP_GET_VARS['order_id'], 'SSL'); ?>')"><?php echo tep_image_button('button_print_order.gif', IMAGE_BUTTON_PRINT_ORDER) . '</a>'; ?></div></td>
               <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
             </tr>
           </table></td>
         </tr>
       </table></td>
     </tr>
   </table></td>
</td>
 </tr>
</table><!-- body_text_eof //-->
   <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- right_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_right.php'); ?>
<!-- right_navigation_eof //-->
   </table></td>
 </tr>
</table>
<!-- body_eof //-->

<!-- footer //-->
<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
<!-- footer_eof //-->
<?php
// END Fancier Order Details & Print Invoice
?>
</body>
</html>
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>


[quote=enigma1,Aug 23 2005, 10:38 AM]
the box width should be controlled by BOX_WIDTH. Did you change that in account_history_info.php?[CODE]

Thanks for any help..
anj

Should be like this:
[code]
<td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">




			
		
Link to comment
Share on other sites

I briefly looked at it and I am not sure if the html is correct 100% (those colspans hard to follow). Goto w3c validator check your page for html errors see if there are additional or missing table elements

 

http://validator.w3.org/

 

just enter the url and check it.

Link to comment
Share on other sites

what I said probably aint gonna work cuz you need to login :'( first. so you could create a test page with this code take out the login requirements then test the html

Link to comment
Share on other sites

Thanks for the suggestion but you were right It won't work. I tried to take out the login requirments but still nothing.

I love that link, thanks, I'm sure I'll be using it in the future :thumbsup:

 

Any other suggestions? I went live today and have had almost 100 hits but no buys so no one will be looking up there account yet...

 

Thanks again for so much help.

 

anj

 

what I said probably aint gonna work cuz you need to login :'( first. so you could create a test page with this code take out the login requirements then test the html

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...