Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

issue with header.php category display in IE


aformoftruth

Recommended Posts

Help i have a serious issue i have added some new information and a new category to my database via the easypopulate system which seemed to work just fine except that when i call the product via the category(PENDANTS) it seems to not display one of the pictures but when i call it via its sub category(Amethyst) it seems to display fine....But the dummy data subcategories that was installed with the template works fine!?

 

In mozilla it looks fine but IE it looks all messed up?!

 

http://anandajewellery.com/

 

I figure its missing the top picture and so has screwed up all the tables which mozilla handles well but ie no?!

 

Help its something in my header.php file to do with category i'm sure....

<?php
/*
 $Id: header.php,v 1.42 2003/06/10 18:20:38 hpdl Exp $

 osCommerce, Open Source E-Commerce Solutions
 [url="http://www.oscommerce.com"]http://www.oscommerce.com[/url]

 Copyright © 2003 osCommerce

 Released under the GNU General Public License
*/

// check if the 'install' directory exists, and warn of its existence
 if (WARN_INSTALL_EXISTENCE == 'true') {
   if (file_exists(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/install')) {
     $messageStack->add('header', WARNING_INSTALL_DIRECTORY_EXISTS, 'warning');
   }
 }

// check if the configure.php file is writeable
 if (WARN_CONFIG_WRITEABLE == 'true') {
   if ( (file_exists(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/includes/configure.php')) && (is_writeable(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/includes/configure.php')) ) {
     $messageStack->add('header', WARNING_CONFIG_FILE_WRITEABLE, 'warning');
   }
 }

// check if the session folder is writeable
 if (WARN_SESSION_DIRECTORY_NOT_WRITEABLE == 'true') {
   if (STORE_SESSIONS == '') {
     if (!is_dir(tep_session_save_path())) {
       $messageStack->add('header', WARNING_SESSION_DIRECTORY_NON_EXISTENT, 'warning');
     } elseif (!is_writeable(tep_session_save_path())) {
       $messageStack->add('header', WARNING_SESSION_DIRECTORY_NOT_WRITEABLE, 'warning');
     }
   }
 }

// check session.auto_start is disabled
 if ( (function_exists('ini_get')) && (WARN_SESSION_AUTO_START == 'true') ) {
   if (ini_get('session.auto_start') == '1') {
     $messageStack->add('header', WARNING_SESSION_AUTO_START, 'warning');
   }
 }

 if ( (WARN_DOWNLOAD_DIRECTORY_NOT_READABLE == 'true') && (DOWNLOAD_ENABLED == 'true') ) {
   if (!is_dir(DIR_FS_DOWNLOAD)) {
     $messageStack->add('header', WARNING_DOWNLOAD_DIRECTORY_NON_EXISTENT, 'warning');
   }
 }

 if ($messageStack->size('header') > 0) {
   echo $messageStack->output('header');
 }
?>
<!--added new table-->
<table id="MAIN Table" border="0" cellpadding=0 cellspacing="0" align="center">
<tr>
 <td><img src="images/background_rectangle_plain_top.png"></td>
</tr>
<tr>
<td background="images/background_rectangle_plain_body.png" align="center">
<!-- eof NT-->
<table id="Table_New_Header" width="709" height="225" border="0" cellpadding=0 cellspacing="0">
<tr>
	<td rowspan="3">
		<!--<a href=<?=tep_href_link('index.php')?>>--><img src="images/title.jpg" width="316" height="146" alt=""><!--</a>--></td>
	<td colspan="4" background="images/boxes.jpg" width="392" height="79">
<!--Boxes INFORMATION inserted-->
<table cellspacing=0 cellpadding=0>
              <tr><td height=0 colspan=7></td></tr>
              <tr><td width=22></td>
                  <td width=93 valign=top>
                   <table cellspacing=0 cellpadding=0>
                    <tr><td class=cs style="font-weight: normal">Currencies:</td></tr>
                    <tr><td height=3></td></tr>
                    <tr><td>
<? // CURRENCIES

   echo tep_draw_form('currencies', tep_href_link(basename($PHP_SELF), '', $request_type, false), 'get');

   reset($currencies->currencies);
   $currencies_array = array();
   while (list($key, $value) = each($currencies->currencies)) {
     $currencies_array[] = array('id' => $key, 'text' => $value['title']);
   }

   $hidden_get_variables = '';
   reset($HTTP_GET_VARS);
   while (list($key, $value) = each($HTTP_GET_VARS)) {
     if ( ($key != 'currency') && ($key != tep_session_name()) && ($key != 'x') && ($key != 'y') ) {
       $hidden_get_variables .= tep_draw_hidden_field($key, $value);
     }
   }

   echo tep_draw_pull_down_menu('currency', $currencies_array, $currency, 'onChange="this.form.submit();" style="width:90px " ') . $hidden_get_variables . tep_hide_session_id();
   echo '</form>';

?>               
                    </td></tr>
                    <tr><td height=3></td></tr>
                    <tr><td height=15>
<? // LANGUAGES

/* if (!isset($lng) || (isset($lng) && !is_object($lng))) {
   include(DIR_WS_CLASSES . 'language.php');
   $lng = new language;
 }

 $languages_string = '';
 reset($lng->catalog_languages);
 while (list($key, $value) = each($lng->catalog_languages)) {
   $languages_string .= ' <a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('language', 'currency')) . 'language=' . $key, $request_type) . '">' . tep_image(DIR_WS_LANGUAGES .  $value['directory'] . '/images/' . $value['image'], $value['name']) . '</a> ';
 }

 echo $languages_string;*/

?>     


                    </td></tr>
                    <tr><td height=3></td></tr>                     
                   </table>
                  </td>
                  <td width=24></td>
                  <td width=92 valign=top>
                   <table cellspacing=0 cellpadding=0>
                    <tr><td height=5></td></tr>
                    <tr><td><img src=images/m15.gif width=2 height=3 align=absmiddle>  <a class=ml href=<?=tep_href_link('specials.php')?>>Specials</a></td></tr>                     
                    <tr><td><img src=images/m15.gif width=2 height=3 align=absmiddle>  <a class=ml href=<?=tep_href_link('create_account.php')?>>Create an account</a></td></tr>                     
                    <tr><td><img src=images/m15.gif width=2 height=3 align=absmiddle>  <a class=ml href=<?=tep_href_link('login.php')?>>Customer Login</a></td></tr>
                    <tr><td height=4></td></tr>                    
                   </table>
                  </td>
                  <td  width=24></td>
                  <td width=118 valign=top>
                   <table cellspacing=0  cellpadding=0 width=118>
                    <tr><td height=7></td></tr>
                    <tr><td class=cs1 align=center><a href=<?=tep_href_link('shopping_cart.php')?>><img src=images/m11.gif width=14 height=9 border=0></a>   <b>Shopping Cart</b></td></tr>
                    <tr><td height=3></td></tr>
                    <tr><td class=cs1>now in your cart <a class=ml1 href=<?=tep_href_link('shopping_cart.php')?>><?=$cart->count_contents()?> items</a></td></tr>
                   </table>
                  </td>
                  <td width=17></td></tr>
             </table>
<!--END Boxes CODE-->

       </td>
	<td>
		<img src="images/spacer.gif" width="1" height="79" alt=""></td>
</tr>
<tr>     
        <td width="86" height="34" border="0"><a href=<?=tep_href_link('index.php')?> class="home-btn"><span>Home Button</span></a></td>

        <td width="98" height="34" border="0"><a href=<?=tep_href_link('about_us.php')?> class="about-us-btn"><span>About Us Button</span></a></td>

        <td width="97" height="34" border="0"><a href=<?=tep_href_link('services.php')?> class="services-btn"><span>Home Button</span></a></td>

        <td width="111" height="34" border="0"><a href=<?=tep_href_link('contact_us.php')?> class="contact-us-btn"><span>contact us Button</span></a></td>

       <td>
		<img src="images/spacer.gif" width="1" height="34" alt=""></td>
</tr>
<tr>
	<td colspan="4" rowspan="2">
		<img src="images/quote.jpg" width="392" height="79" alt=""></td>
	<td>
		<img src="images/spacer.gif" width="1" height="33" alt=""></td>
</tr>
<tr>
	<td>
		<img src="images/space_1.jpg" width="316" height="46" alt=""></td>
	<td>
		<img src="images/spacer.gif" width="1" height="46" alt=""></td>
</tr>
<tr>
	<td colspan="5">
		<img src="images/space_2.jpg" width="708" height="33" alt=""></td>
	<td>
		<img src="images/spacer.gif" width="1" height="33" alt=""></td>
</tr>
</table>

<!--TOP PART END-->

       <!--Top PART START-->
       <table cellspacing=0 cellpadding=0>
        <tr><td width=201 valign=top>
             <table cellspacing=0 cellpadding=0>
              <tr><td background=images/m17.gif width=201 height=31>
<? // SEARCH ?>
                   <table cellspacing=0 cellpadding=0 width=166 align=center>
                   <?=tep_draw_form('quick_find', tep_href_link(FILENAME_ADVANCED_SEARCH_RESULT, '', 'NONSSL', false), 'get')?>
                   <tr><td width=139><center><?=tep_draw_input_field('keywords', '', 'size="20" maxlength="30" onclick="this.value=\'\'" value=" -- jewellery search -- " style="color: #939393"  class=go') . ' ' . tep_hide_session_id()?></center></td><td><input type=image src=images/m16.gif width=25 height=19 border=0></td></tr>
                   <tr><td height=15 colspan=2></td></tr>
                   <tr><td height=9 colspan=2></td></tr>
                 </form>
                 </table>
<? // END SEARCH ?>


              </td></tr>
              <tr><td><img src=images/m18.gif width=201 height=30></td></tr>
              <tr><td class=bg>
                   <table cellspacing=0 cellpadding=0 width=161 align=center>
                    <tr><td height=14 colspan=2></td></tr>



<?   // ---- CATEGORIES 2 LEVELS OPEN

 function tep_show_category($counter) {
   global $tree, $categories_string, $cPath_array;

  if(!$tree[$counter]['level']){               

   $categories_string .= $categories_string ? '<tr><td height=10 colspan=2></td></tr>' : '';             

   $categories_string .= '<tr><td width=6><img src=images/m22.gif width=3 height=5 align=absmiddle></td><td> <a class=ml2  href=';

   if ($tree[$counter]['parent'] == 0) {
     $cPath_new = 'cPath=' . $counter;
   } else {
     $cPath_new = 'cPath=' . $tree[$counter]['path'];
   }
   $categories_string .= tep_href_link('index.php', $cPath_new) . '>';
// display categry name
   $categories_string .= $tree[$counter]['name'];
   $categories_string .= '</a></td></tr>';

  }else{  // SUBCATEGORY

   $categories_string .= '<tr><td colspan=2>   ';

   for($i=0;$i<$tree[$counter]['le vel'];$i++)
    $categories_string .= '   ';

   $categories_string .= '<a class=ml3 style="font-weight:normal;" href=';   
   if ($tree[$counter]['parent'] == 0) {
     $cPath_new = 'cPath=' . $counter;
   } else {
     $cPath_new = 'cPath=' . $tree[$counter]['path'];
   }
   $categories_string .= tep_href_link('index.php', $cPath_new) . '>';
// display category name
   $categories_string .= $tree[$counter]['name'];
   $categories_string .= '</a></td></tr>';
  }  

   if ($tree[$counter]['next_id'] != false) {
     tep_show_category($tree[$counter]['next_id']);
   }  
 }



 define(TABLE_CATEGORIES, "categories");
 define(TABLE_CATEGORIES_DESCRIPTION, "categories_description");
 $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'];
   }

 }


 $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))  {
   $cPath_array2 = Array();    
   $new_path = '';
   $cPath_array2[] = $categories['categories_id'];
   while (list($key, $value) = each($cPath_array2)) {
     unset($parent_id);
     unset($first_id);
     $categories_query2 = 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_query2)) {
       $new_path .= $value;
       while ($row = tep_db_fetch_array($categories_query2)) {
         $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;
     }
   }

 }

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

 $categories_string .=  '';
 tep_show_category($first_element); 
 $categories_string .=  '';

 echo $categories_string;
?>


                    <tr><td height=13></td></tr>
                   </table>
              </td></tr>
              <tr><td><img src=images/m20.gif width=201 height=5></td></tr>
              <tr><td height=1></td></tr>
              <tr><td background="images/m21.gif" width=201 height=96 border=0><br /><br /><br /><br />         <a href=<?=tep_href_link('shipping.php')?> class="m1">Click for details</a></td></tr>
             </table>
            </td>
            <td width=10 valign=top><img src=images/m23.gif width=10 height=61></td>
            <td width=496 valign=top>
             <table cellspacing=0 cellpadding=0>
<!--DELETE <tr><td><img src=images/m34.gif width=496 height=28></td></tr> -->
              <tr><td width=485>













<!--




<?   // ---- MANUFACTURERS


 $manufacturers_query = tep_db_query("select manufacturers_id, manufacturers_name from " . TABLE_MANUFACTURERS . " order by manufacturers_name");
 if ($number_of_rows = tep_db_num_rows($manufacturers_query)) {

     echo '<table cellspacing=0 cellpadding=0 width=177 align=center> '.
             tep_draw_form('manufacturers', tep_href_link(FILENAME_DEFAULT, '', 'NONSSL', false), 'get')
            .' <tr><td colspan=2><b>Search by manufacturers:</b></td></tr>
               <tr><td height=2 colspan=2></td></tr>
               <tr><td colspan=2>
          ';      

     $manufacturers_array = array();
     while ($manufacturers = tep_db_fetch_array($manufacturers_query)) {
       $manufacturers_name = ((strlen($manufacturers['manufacturers_name']) > MAX_DISPLAY_MANUFACTURER_NAME_LEN) ? substr($manufacturers['manufacturers_name'], 0, MAX_DISPLAY_MANUFACTURER_NAME_LEN) . '..' : $manufacturers['manufacturers_name']);
       $manufacturers_array[] = array('id' => $manufacturers['manufacturers_id'],
                                      'text' => $manufacturers_name);
     }

     echo tep_draw_pull_down_menu('manufacturers_id', $manufacturers_array, (isset($HTTP_GET_VARS['manufacturers_id']) ? $HTTP_GET_VARS['manufacturers_id'] : ''), 'onChange="this.form.submit();" size="' . MAX_MANUFACTURERS_LIST . '" class=se1') . tep_hide_session_id();
     echo ' </td>
         </form>
        </table>
          ';
 }

?>


-->

Link to comment
Share on other sites

Actually i beleive its an error with product_listing.php

 

as its not displaying picutre m37 line 85 at the top like all others....

 

here is the code

<?php
/*
 $Id: product_listing.php,v 1.44 2003/06/09 22:49:59 hpdl Exp $

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

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/
 if (isset($pw_mispell)){ //added for search enhancements mod
?>
<table border="0" width="100%" cellspacing="0" cellpadding="2">
<tr><td><?php echo $pw_string; ?></td></tr>
</table>
<?php
} //end added search enhancements mod
 $listing_split = new splitPageResults($listing_sql, MAX_DISPLAY_SEARCH_RESULTS, 'p.products_id');
// fix counted products

 if ( ($listing_split->number_of_rows > 0) && ( (PREV_NEXT_BAR_LOCATION == '1') || (PREV_NEXT_BAR_LOCATION == '3') ) ) {
?>
<table border="0" width="100%" cellspacing="0" cellpadding="2">
 <tr>
<td class="smallText"><?php echo $listing_split->display_count(TEXT_DISPLAY_NUMBER_OF_PRODUCTS); ?></td>
<td class="smallText" align="right"><?php echo TEXT_RESULT_PAGE . ' ' . $listing_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?></td>
 </tr>
</table>
<?php
 }

 $list_box_contents = array();

 for ($col=0, $n=sizeof($column_list); $col<$n; $col++) {
switch ($column_list[$col]) {
  case 'PRODUCT_LIST_MODEL':
	$lc_text = TABLE_HEADING_MODEL;
	$lc_align = '';
	break;
  case 'PRODUCT_LIST_NAME':
	$lc_text = TABLE_HEADING_PRODUCTS;
	$lc_align = '';
	break;
  case 'PRODUCT_LIST_MANUFACTURER':
	$lc_text = TABLE_HEADING_MANUFACTURER;
	$lc_align = '';
	break;
  case 'PRODUCT_LIST_PRICE':
	$lc_text = TABLE_HEADING_PRICE;
	$lc_align = 'right';
	break;
  case 'PRODUCT_LIST_QUANTITY':
	$lc_text = TABLE_HEADING_QUANTITY;
	$lc_align = 'right';
	break;
  case 'PRODUCT_LIST_WEIGHT':
	$lc_text = TABLE_HEADING_WEIGHT;
	$lc_align = 'right';
	break;
  case 'PRODUCT_LIST_IMAGE':
	$lc_text = TABLE_HEADING_IMAGE;
	$lc_align = 'center';
	break;
  case 'PRODUCT_LIST_BUY_NOW':
	$lc_text = TABLE_HEADING_BUY_NOW;
	$lc_align = 'center';
	break;
}

if ( ($column_list[$col] != 'PRODUCT_LIST_BUY_NOW') && ($column_list[$col] != 'PRODUCT_LIST_IMAGE') ) {
  $lc_text = tep_create_sort_heading($HTTP_GET_VARS['sort'], $col+1, $lc_text);
}

$list_box_contents[0][] = array('align' => $lc_align,
								'params' => 'class="productListing-heading"',
								'text' => ' ' . $lc_text . ' ');
 }

 if ($listing_split->number_of_rows > 0) {
$rows = 0;
$column = 0;
echo '   
				<table cellspacing=0 cellpadding=0>
				 <tr><td><img src=images/m37.gif width=485 height=37></td></tr>
				 <tr><td class=bg2>
					  <table cellspacing=0 cellpadding=0 width=461 align=center>
					   <tr><td height=8 bgcolor=#ffffff align=center colspan=3></td></tr>
					   <tr><td bgcolor=#ffffff colspan=3>       <font color=#545454>'.$breadcrumb->trail(' » ').'</font></td></tr>
					   <tr><td height=15 bgcolor=#ffffff align=center colspan=3></td></tr>
					   <tr>



	 ';

$listing_query = tep_db_query($listing_split->sql_query);
while ($listing = tep_db_fetch_array($listing_query)) {
  $product_contents = array();
  $rows++;
  if (($rows/2) == floor($rows/2)) {
	$list_box_contents[] = array('params' => 'class="productListing-even"');
  } else {
	$list_box_contents[] = array('params' => 'class="productListing-odd"');
  }

  $cur_row = sizeof($list_box_contents) - 1;

  for ($col=0, $n=sizeof($column_list); $col<$n; $col++) {
	$lc_align = '';

	switch ($column_list[$col]) {
	  case 'PRODUCT_LIST_MODEL':
		$lc_align = '';
		$lc_text = ' ' . $listing['products_model'] . ' ';
		break;
	  case 'PRODUCT_LIST_NAME':
		$lc_align = '';
		if (isset($HTTP_GET_VARS['manufacturers_id'])) {
		  $lc_text = '<a class=ml5 href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id'] . '&products_id=' . $listing['products_id']) . '">' . $listing['products_name'] . '</a>';
		} else {
		  $lc_text = '<a class=ml5 href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']) . '">' . $listing['products_name'] . '</a>';
		}
		break;
	  case 'PRODUCT_LIST_MANUFACTURER':
		$lc_align = '';
		$lc_text = ' <a href="' . tep_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $listing['manufacturers_id']) . '">' . $listing['manufacturers_name'] . '</a> ';
		break;
	  case 'PRODUCT_LIST_PRICE':
		$lc_align = 'right';
		if (tep_not_null($listing['specials_new_products_price'])) {
		  $lc_text = '<span style="color:#7F7F7F;font-size:12px"><s>' .  $currencies->display_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</s></span> <span  class=sc2>' . $currencies->display_price($listing['specials_new_products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</span>';
		} else {
		  $lc_text = '<span>' . $currencies->display_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</span>';
		}
		break;
	  case 'PRODUCT_LIST_QUANTITY':
		$lc_align = 'right';
		$lc_text = ' ' . $listing['products_quantity'] . ' ';
		break;
	  case 'PRODUCT_LIST_WEIGHT':
		$lc_align = 'right';
		$lc_text = ' ' . $listing['products_weight'] . ' ';
		break;
	  case 'PRODUCT_LIST_IMAGE':
		$lc_align = 'center';
		if (isset($HTTP_GET_VARS['manufacturers_id'])) {
		  $lc_text = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id'] . '&products_id=' . $listing['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $listing['products_image'], $listing['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a>';
		} else {
		  $lc_text = ' <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $listing['products_image'], $listing['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a> ';
		}
		break;
	  case 'PRODUCT_LIST_BUY_NOW':
		$lc_align = 'center';
		$lc_text = '<a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing['products_id']) . '">' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW) . '</a> ';
		break;
	}

	$list_box_contents[$cur_row][] = array('align' => $lc_align,
										   'params' => 'class="productListing-data"',
										   'text'  => $lc_text);
	$product_contents[] = $lc_text;	   
  }


  $product_query = tep_db_query("select products_description  from " . TABLE_PRODUCTS_DESCRIPTION . " where products_id = '" . (int)$listing['products_id'] . "' and language_id = '" . (int)1 . "'");
  $product = tep_db_fetch_array($product_query);
  $new_products['products_description'] = $product['products_description'];

  echo '
					   <td width=241 valign=top>
							<table cellspacing=0 cellpadding=0 width=200 align=center>
							 <tr><td style="padding-top: 6px"  valign=top  align=center width=99>'.$product_contents[0].'</td>
								 <td width=101 valign=top>
								  <table cellspacing=0  cellpadding=0>
								   <tr><td height=1></td></tr>
								   <tr><td style="padding-top: 5px" valign=top  class=ml5  height=60>'.$product_contents[1].'</td></tr>
								   <tr><td class=cs2 height=40 valign=bottom>'.$product_contents[2].'</td></tr>
								   <tr><td height=11></td></tr>
								  </table>
							 </td></tr>
							 <tr><td height=1 colspan=2 bgcolor=#B2B2B2></td></tr>
							 <tr><td height=1 colspan=2></td></tr>
							 <tr><td colspan=2><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $listing['products_id']) . '">' . tep_image_button('small_view.gif') . '</a> <a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing['products_id']) . '">' . tep_image_button('button_in_cart.gif') . '</a><td></tr>
							 <tr><td height=20 colspan=2></td></tr>
							</table>
						   </td>




  ';
  $column ++;
  if ($column >= 2) {
	$rows ++;
	$column = 0;
	echo '


					   </tr>
					   <tr><td colspan=3 height=2 bgcolor=#ffffff></td></tr>
					   <tr><td colspan=3><img src=images/m35.gif wight=483 height=1></td></tr>
					   <tr><td colspan=3 height=2 bgcolor=#ffffff></td></tr>
					   <tr>


		 ';
  } else echo '<td width=1></td>';



}

echo '



					   </tr>													 
					  </table>
				 </td></tr>
				 <tr><td><img src=images/m26.gif width=485 height=22></td></tr>
				</table>

	 ';

//new productListingBox($list_box_contents);
 } else {
$list_box_contents = array();

$list_box_contents[0] = array('params' => 'class="productListing-odd"');
$list_box_contents[0][] = array('params' => 'class="productListing-data"',
							   'text' => TEXT_NO_PRODUCTS);

echo '<div class=PageHeading>Categories</div>';
new productListingBox($list_box_contents);
 }

 if ( ($listing_split->number_of_rows > 0) && ((PREV_NEXT_BAR_LOCATION == '2') || (PREV_NEXT_BAR_LOCATION == '3')) ) {
?>

<table border="0" width="100%" cellspacing="0" cellpadding="2">
 <tr><td height=20></td></tr>
 <tr>
<td class="smallText"><?php echo $listing_split->display_count(TEXT_DISPLAY_NUMBER_OF_PRODUCTS); ?></td>
<td class="smallText" align="right"><?php echo TEXT_RESULT_PAGE . ' ' . $listing_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?></td>
 </tr>
</table>

<?php
 }
?>

Link to comment
Share on other sites

Ok so i have narrowed it down more i think the problem is with new_products.php

 

As i seems when this is called by the CATEGORY display it chucks in its own coding which is throwing out the tables in IE

 

on about line 17 onwards (obviously hehe)

 

This seems to be the problem because when i call the Diamonds category then this code has not been used....

 

Help....

 

<?php
/*
 edited - 2005/07/01 13:50

 -----------------------------------------

 $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

 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;


 echo '

				<table cellspacing=0 cellpadding=0>
				 <tr><td><img src=images/m25.gif width=485 height=36></td></tr>
				 <tr><td class=bg2>
					  <table cellspacing=0 cellpadding=0 width=461 align=center>
					   <tr><td height=14 bgcolor=#ffffff align=center colspan=3></td></tr>
					   <tr>

   ';


 while ($new_products = tep_db_fetch_array($new_products_query)) {
  $new_products['products_name'] = tep_get_products_name($new_products['products_id']);
  $product_query = tep_db_query("select products_description  from " . TABLE_PRODUCTS_DESCRIPTION . " where products_id = '" . (int)$new_products['products_id'] . "' and language_id = '" . (int)1 . "'");
  $product = tep_db_fetch_array($product_query);
  $new_products['products_description'] = $product['products_description'];
  echo '

					   <td width=241 valign=top>
							<table cellspacing=0 cellpadding=0 width=200 align=center >
							 <tr><td align=center width=97><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, 'vspace=5') . '</a></td>
								 <td width=103 valign=top>
								  <table cellspacing=0 cellpadding=0>
								   <tr><td height=8></td></tr>
								   <tr><td height=60 valign=top  width=103><a class=ml5 href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '">' . $new_products['products_name'] . '</a></td></tr>																			 
								   <tr><td height=11></td></tr>
								   <tr><td height=20 class=cs2>'.$currencies->display_price($new_products['products_price'], tep_get_tax_rate($new_products['products_tax_class_id'])).'</td></tr>
								   <tr><td height=10></td></tr>
								  </table>
							 </td></tr>
							 <tr><td height=1 colspan=2 bgcolor=#B2B2B2></td></tr>
							 <tr><td height=1 colspan=2></td></tr>
							 <tr><td colspan=2><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '">' . tep_image_button('small_view.gif') . '</a> <a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $new_products['products_id']) . '">' . tep_image_button('button_in_cart.gif') . '</a></td></tr>
							 <tr><td height=20 colspan=2></td></tr>
							</table>
						   </td>




	';

$col ++;
if ($col > 1) {
  $col = 0;
  $row ++;
  echo '
					  </tr>
					   <tr><td colspan=3 height=2 bgcolor=#ffffff></td></tr>
					   <tr><td colspan=3><img src=images/m35.gif wight=483 height=1></td></tr>

					   <tr>		   ';
} else echo '<td width=1></td>
';
 }


 echo '


					   </tr>						   
					  </table>

   ';


?>
<!-- new_products_eof //-->

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...