Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Something went wrong help!


mattc428

Recommended Posts

If you look at this screenshot you will see that in the circled border shows up fine in internet explorer, but is mysteriously disappearing in firefox :blink:

 

missing.gif

 

I will post my new_products.php and stylesheet.css to see if anyone can help me figure out what the issue is? I have been looking at this code for 2 days!

 

Here is the code for my new_products.php

<?php
/*
 $Id: new_products.php,v 1.34 2003/06/09 22:49:58 hpdl Exp $

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

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/
?>
<!-- new_products //-->
<?php
 $info_box_contents = array();
 $info_box_contents[] = array('text' => sprintf(TABLE_HEADING_NEW_PRODUCTS, strftime('%B')));

 new contentBoxHeading($info_box_contents);

 if ( (!isset($new_products_category_id)) || ($new_products_category_id == '0') ) {
$new_products_query = tep_db_query("select p.products_id, p.products_image, p.products_tax_class_id, if(s.status, s.specials_new_products_price, p.products_price) as products_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where products_status = '1' order by p.products_date_added desc limit " . MAX_DISPLAY_NEW_PRODUCTS);
 } else {
$new_products_query = tep_db_query("select distinct p.products_id, p.products_image, p.products_tax_class_id, if(s.status, s.specials_new_products_price, p.products_price) as products_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c where p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and c.parent_id = '" . (int)$new_products_category_id . "' and p.products_status = '1' order by p.products_date_added desc limit " . MAX_DISPLAY_NEW_PRODUCTS);
 }

 $row = 0;
 $col = 0;
 $info_box_contents = array();
 while ($new_products = tep_db_fetch_array($new_products_query)) {
$new_products['products_name'] = tep_get_products_name($new_products['products_id']);

$sql = 'SELECT `products_description` FROM `products_description` WHERE products_id ='.$new_products['products_id'].' && language_id='.(int)$languages_id;
$description_query = tep_db_query($sql);
$description = mysql_fetch_array($description_query, MYSQL_ASSOC);		
$description['products_description'] = substr($description['products_description'], 0, 40);
$desc_len = strlen($description['products_description']);
$description['products_description'][$desc_len-1] = '.';
$description['products_description'][$desc_len-2] = '.';
$description['products_description'][$desc_len-3] = '.';

if  ( ($col == 1 && $row == 0) || ($col == 1 && $row == 2) ){
$info_box_contents[$row][$col] = array('align' => 'center',
									   'params' => 'width="21" height="100%" valign="middle"',
									   'text' => '<table height="90%" width="100%" background="'.DIR_WS_IMAGES .'theme/m_vert.jpg" border="0" cellspacing="0" cellpadding="0" >
 <tr>
<td><div style="width:21px"></div></td>
 </tr>
</table>');
}
elseif (($col == 0 && $row == 1) || ($col == 2 && $row == 1)) {
$info_box_contents[$row][$col] = array('align' => 'center',
									   'params' => 'height="21"',
									   'text' => '<table width="90%" background="'.DIR_WS_IMAGES .'theme/m_horizontal.jpg" border="0" cellspacing="0" cellpadding="0" >
 <tr>
<td><div style="height:21px"></td>
 </tr>
</table>');
}
elseif ($col == 1 && $row == 1) {
$info_box_contents[$row][$col] = array('align' => '',
									   'params' => '',
									   'text' => ' ');
}
else {	
$info_box_contents[$row][$col] = array('align' => 'center',
									   'params' => 'class="main" width="50%" valign="top"',
									   'text' => '<table width=100% cellpadding=0 cellspacing= border=0><tr><td width="50%"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $new_products['products_image'], $new_products['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'align="absmiddle"') . '</a></td><td width="50%" class="main"><br><a class="productTitle" href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '">' . $new_products['products_name'] . '</a><br><font style="productDesc">'.$description['products_description'].'</font><br><table width="90%"  border="0" cellspacing="2" cellpadding="0">
 <tr>
<td background="'.DIR_WS_IMAGES .'theme/m_price.jpg" height=5px></td>
 </tr>
 <tr>
<td class="productTitle">' . $currencies->display_price($new_products['products_price'], tep_get_tax_rate($new_products['products_tax_class_id'])).'</td>
 </tr>
 <tr>
<td background="'.DIR_WS_IMAGES .'theme/m_price.jpg" height=5px></td>
 </tr>
</table>
<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '">View Details</a>
</td></tr></table>'); }


$col ++;
if ($col > 2) {
  $col = 0;
  $row ++;
}

 }
 new contentBox($info_box_contents, 0);
?>

<!-- new_products_eof //-->

 

 

And here is my stylesheet

 

/*
 $Id: stylesheet.css,v 1.56 2003/06/30 20:04:02 hpdl Exp $

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

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/

.boxText { font-family:Tahoma, Verdana, Arial, sans-serif; font-size: 10px; }
.errorBox { font-family :Tahoma, Verdana, Arial, sans-serif; font-size : 10px; background: #ffb3b5; font-weight: bold; }
.stockWarning { font-family :Tahoma, Verdana, Arial, sans-serif; font-size : 10px; color: #cc0033; }
.productsNotifications { background: #f2fff7; }
.orderEdit { font-family :Tahoma, Verdana, Arial, sans-serif; font-size : 10px; color: #70d250; text-decoration: underline; }

BODY {
 background: #ffffff;
 margin: 0px;
 font:11px Tahoma;
 color: #6e6e6e;
}

A {
font-family: Tahoma,Verdana;
font-size: 11px;	
color: #5CA0C7;		
}
A:visited {
color: #5CA0C7;
}
A:hover {
color: #5CA0C7;
}
A:active {
color: #5CA0C7;	
}

FORM {
display: inline;
margin:0px;
}

TR.header {
 background: #ffffff;
}

TR.headerNavigation {
 background: #bbc3d3;
}

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

A.headerNavigation { 
 color: #FFFFFF; 
}

A.headerNavigation:hover {
 color: #ffffff;
}

TR.headerError {
 background: #ff0000;
}

TD.headerError {
 font-family: Tahoma,Tahoma, Verdana, Arial, sans-serif;
 font-size: 12px;
 background: #ff0000;
 color: #ffffff;
 font-weight : bold;
 text-align : center;
}

TR.headerInfo {
 background: #00ff00;
}

TD.headerInfo {
 font-family: Tahoma,Tahoma, Verdana, Arial, sans-serif;
 font-size: 12px;
 background: #00ff00;
 color: #ffffff;
 font-weight: bold;
 text-align: center;
}

TR.footer {
 background: #bbc3d3;
}

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

.infoBox {
 background: #ffffff;
}

.infoBoxContents {
 background: #ffffff;
 font-family:Tahoma, Verdana, Arial, sans-serif;
 font-size: 10px;
 border:1px solid #D5D5D5;
}

.infoBoxNotice {
 background: #FF8E90;
}

.infoBoxNoticeContents {
 background: #FFE6E6;
 font-family:Tahoma, Verdana, Arial, sans-serif;
 font-size: 10px;
}

TD.infoBoxHeading {
 font-family: Myriad, Tahoma, Verdana, Arial, sans-serif;
 font-size: 14px;
 font-weight: bold;
 color: #4C4C4C;
}

TD.infoBox, SPAN.infoBox {
 font-family:Tahoma, Verdana, Arial, sans-serif;
 font-size: 10px;
}

TR.accountHistory-odd, TR.addressBook-odd, TR.alsoPurchased-odd, TR.payment-odd, TR.productListing-odd, TR.productReviews-odd, TR.upcomingProducts-odd, TR.shippingOptions-odd {
 background: #f8f8f9;
}

TR.accountHistory-even, TR.addressBook-even, TR.alsoPurchased-even, TR.payment-even, TR.productListing-even, TR.productReviews-even, TR.upcomingProducts-even, TR.shippingOptions-even {
 background: #f8f8f9;
}

TABLE.productListing {
 border: 1px;
 border-style: solid;
 border-color: #b6b7cb;
 border-spacing: 1px;
}

.productListing-heading {
 font-family:Tahoma, Verdana, Arial, sans-serif;
 font-size: 10px;
 background: #b6b7cb;
 color: #FFFFFF;
 font-weight: bold;
}

TD.productListing-data {
 font-family:Tahoma, Verdana, Arial, sans-serif;
 font-size: 10px;
}

A.pageResults {
 color: #0000FF;
}

A.pageResults:hover {
 color: #0000FF;
 background: #FFFF33;
}

TD.pageHeading, DIV.pageHeading {
color: #5CA0C7;
font-family: Myriad, Tahoma, Verdana, Arial, sans-serif;
font-size: 12px;
font-weight: bold;
}

TR.subBar {
 background: #f4f7fd;
}

TD.subBar {
 font-family:Tahoma, Verdana, Arial, sans-serif;
 font-size: 10px;
 color: #000000;
}

TD.main, P.main {
 font-family:Tahoma, Verdana, Arial, sans-serif;
 font-size: 11px;
}

TD.smallText, SPAN.smallText, P.smallText {
 font-family:Tahoma, Verdana, Arial, sans-serif;
 font-size: 10px;
}

TD.accountCategory {
 font-family:Tahoma, Verdana, Arial, sans-serif;
 font-size: 13px;
 color: #aabbdd;
}

TD.fieldKey {
 font-family:Tahoma, Verdana, Arial, sans-serif;
 font-size: 12px;
 font-weight: bold;
}

TD.fieldValue {
 font-family:Tahoma, Verdana, Arial, sans-serif;
 font-size: 12px;
}

TD.tableHeading {
 font-family:Tahoma, Verdana, Arial, sans-serif;
 font-size: 12px;
 font-weight: bold;
}

SPAN.newItemInCart {
 font-family:Tahoma, Verdana, Arial, sans-serif;
 font-size: 10px;
 color: #ff0000;
}

CHECKBOX, INPUT, RADIO, SELECT {
 font-family:Tahoma, Verdana, Arial, sans-serif;
 font-size: 11px;
}

TEXTAREA {
 width: 100%;
 font-family:Tahoma, Verdana, Arial, sans-serif;
 font-size: 11px;
}

SPAN.greetUser {
 font-family:Tahoma, Verdana, Arial, sans-serif;
 font-size: 12px;
 color: #f0a480;
 font-weight: bold;
}

TABLE.formArea {
 background: #f1f9fe;
 border-color: #7b9ebd;
 border-style: solid;
 border-width: 1px;
}

TD.formAreaTitle {
 font-family: Tahoma,Tahoma, Verdana, Arial, sans-serif;
 font-size: 12px;
 font-weight: bold;
}

SPAN.markProductOutOfStock {
 font-family: Tahoma,Tahoma, Verdana, Arial, sans-serif;
 font-size: 12px;
 color: #c76170;
 font-weight: bold;
}

SPAN.productSpecialPrice {
 font-family:Tahoma, Verdana, Arial, sans-serif;
 color: #ff0000;
}

SPAN.errorText {
 font-family:Tahoma, Verdana, Arial, sans-serif;
 color: #ff0000;
}

.moduleRow { }
.moduleRowOver { background-color: #D7E9F7; cursor: pointer; cursor: hand; }
.moduleRowSelected { background-color: #E9F4FC; }

.checkoutBarFrom, .checkoutBarTo { font-family:Tahoma, Verdana, Arial, sans-serif; font-size: 10px; color: #8c8c8c; }
.checkoutBarCurrent { font-family:Tahoma, Verdana, Arial, sans-serif; font-size: 10px; color: #000000; }

/* message box */

.messageBox { font-family:Tahoma, Verdana, Arial, sans-serif; font-size: 10px; }
.messageStackError, .messageStackWarning { font-family:Tahoma, Verdana, Arial, sans-serif; font-size: 10px; background-color: #ffb3b5; }
.messageStackSuccess { font-family:Tahoma, Verdana, Arial, sans-serif; font-size: 10px; background-color: #99ff00; }

/* input requirement */

.inputRequirement { font-family:Tahoma, Verdana, Arial, sans-serif; font-size: 10px; color: #ff0000; }
.productTitle {
color: #5CA0C7;
font-family: Myriad, Tahoma, Verdana, Arial, sans-serif;
font-size: 12px;
font-weight: bold;
}
.productPrice {
color: #848484;
font-family: Myriad, Tahoma, Verdana, Arial, sans-serif;
font-size: 10px;
font-weight: bold;
}
.productDesc {
color: #848484;
font-family: Tahoma, Verdana, Arial, sans-serif;
font-size: 9px;
}
A.productTitle { 
 color: #5CA0C7;
font-family: Myriad, Tahoma, Verdana, Arial, sans-serif;
font-size: 12px;
font-weight: bold; 
}

A.productTitle:hover {
color: #5CA0C7;
font-family: Myriad, Tahoma, Verdana, Arial, sans-serif;
font-size: 12px;
font-weight: bold;
}

A.category { 
 font-family: Tahoma,Verdana;
font-size: 11px;	
color: #5CA0C7; 
}

A.category:hover {
font-family: Tahoma,Verdana;
font-size: 11px;	
color: #5CA0C7;
}

 

Any ideas?

Link to comment
Share on other sites

Ok using the FIrefox Web Developer Extension - I can edit the html source code of the home page of my site. In order to make that border work in firefox, I added a <tbody> tag.

 

Question now is how do I get a <tbody> tag inserted into my new_products.php so that I parses there when the page is loaded?

 

Here is my index page source code and I highlighted where I added the tag

 

<td class="infoBoxHeading" height="40" width="100%">New Products For February</td>

<td class="infoBoxHeading" height="40" nowrap="nowrap"><img src="images/theme/r_box.jpg" alt="" border="0" height="40" width="15"></td>

</tr>

</tbody></table>

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

<tbody><tr>

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

<tbody><tr>

<td class="main" align="center" valign="top" width="50%"><table cellpadding="0" cellspacing="border=0" width="100%"><tbody><tr><td width="50%"><a href="http://shop.yorkvillepc.com/product_info.php?products_id=26"><img src="images/microsoft/imexplorer.gif" alt="Microsoft IntelliMouse Explorer" title=" Microsoft IntelliMouse Explorer " align="absmiddle" border="0" height="80" width="100"></a></td><td class="main" width="50%"><br><a class="productTitle" href="http://shop.yorkvillepc.com/product_info.php?products_id=26">Microsoft IntelliMouse Explorer</a><br><font style="">Microsoft introduces its most advance...</font><br><table border="0" cellpadding="0" cellspacing="2" width="90%">

<tbody><tr>

<td background="images/theme/m_price.jpg" height="5"></td>

</tr>

<tr>

<td class="productTitle">$64.95</td>

</tr>

<tr>

<td background="images/theme/m_price.jpg" height="5"></td>

</tr>

</tbody></table>

<a href="http://shop.yorkvillepc.com/product_info.php?products_id=26">View Details</a>

</td></tr></tbody></table></td>

<td align="center" height="100%" valign="middle" width="21"><table background="images/theme/m_vert.jpg" border="0" cellpadding="0" cellspacing="0" height="90%" width="100%">

<tbody><tr>

<td><div style="width: 21px;"></div></td>

</tr>

</tbody></table></td>

<td class="main" align="center" valign="top" width="50%"><table cellpadding="0" cellspacing="border=0" width="100%"><tbody><tr><td width="50%"><a href="http://shop.yorkvillepc.com/product_info.php?products_id=15"><img src="images/dvd/frantic.gif" alt="Asus A2N6 - Mainboard" title=" Asus A2N6 - Mainboard " align="absmiddle" border="0" height="80" width="100"></a></td><td class="main" width="50%"><br><a class="productTitle" href="http://shop.yorkvillepc.com/product_info.php?products_id=15">Asus A2N6 - Mainboard</a><br><font style=""><b>Specifications: </b><br>

<li>Supp...</li></font><br><table border="0" cellpadding="0" cellspacing="2" width="90%">

<tbody><tr>

<td background="images/theme/m_price.jpg" height="5"></td>

</tr>

<tr>

<td class="productTitle">$35.00</td>

</tr>

<tr>

<td background="images/theme/m_price.jpg" height="5"></td>

</tr>

</tbody></table>

<a href="http://shop.yorkvillepc.com/product_info.php?products_id=15">View Details</a>

</td></tr></tbody></table></td>

</tr>

<tr>

<td align="center" height="21"><table background="images/theme/m_horizontal.jpg" border="0" cellpadding="0" cellspacing="0" width="90%">

<tbody><tr>

<td><div style="height: 21px;"></div></td>

</tr>

</tbody></table></td>

<td> </td>

<td align="center" height="21"><table background="images/theme/m_horizontal.jpg" border="0" cellpadding="0" cellspacing="0" width="90%">

<tr>

<td><div style="height: 21px;"></div></td>

</tr>

</tbody></table></td>

</tr>

<tbody><tr>

<td class="main" align="center" valign="top" width="50%"><table cellpadding="0" cellspacing="border=0" width="100%"><tbody><tr><td width="50%"><a href="http://shop.yorkvillepc.com/product_info.php?products_id=21"><img src="images/sierra/swat_3.gif" alt="Data cable" title=" Data cable " align="absmiddle" border="0" height="80" width="100"></a></td><td class="main" width="50%"><br><a class="productTitle" href="http://shop.yorkvillepc.com/product_info.php?products_id=21">Data cable</a><br><font style="">The Video 2 Component Video Cable fro...</font><br><table border="0" cellpadding="0" cellspacing="2" width="90%">

<tbody><tr>

<td background="images/theme/m_price.jpg" height="5"></td>

</tr>

<tr>

<td class="productTitle">$79.99</td>

</tr>

<tr>

<td background="images/theme/m_price.jpg" height="5"></td>

</tr>

</tbody></table>

<a href="http://shop.yorkvillepc.com/product_info.php?products_id=21">View Details</a>

</td></tr></tbody></table></td>

<td align="center" height="100%" valign="middle" width="21"><table background="images/theme/m_vert.jpg" border="0" cellpadding="0" cellspacing="0" height="90%" width="100%">

<tbody><tr>

<td><div style="width: 21px;"></div></td>

</tr>

</tbody></table></td>

<td class="main" align="center" valign="top" width="50%"><table cellpadding="0" cellspacing="border=0" width="100%"><tbody><tr><td width="50%"><a href="http://shop.yorkvillepc.com/product_info.php?products_id=24"><img src="images/gt_interactive/disciples.gif" alt="Floppy Disk Drive" title=" Floppy Disk Drive " align="absmiddle" border="0" height="80" width="100"></a></td><td class="main" width="50%"><br><a class="productTitle" href="http://shop.yorkvillepc.com/product_info.php?products_id=24">Floppy Disk Drive</a><br><font style=""><b>Product Highlights</b><br>

<li>Re...</li></font><br><table border="0" cellpadding="0" cellspacing="2" width="90%">

<tbody><tr>

<td background="images/theme/m_price.jpg" height="5"></td>

</tr>

<tr>

<td class="productTitle">$90.00</td>

</tr>

<tr>

<td background="images/theme/m_price.jpg" height="5"></td>

</tr>

</tbody></table>

<a href="http://shop.yorkvillepc.com/product_info.php?products_id=24">View Details</a>

</td></tr></tbody></table></td>

</tr>

</tbody></table>

</td>

</tr>

</tbody></table>

 

<!-- new_products_eof //--></td>

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...