Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Footer width on first page


patator

Recommended Posts

Most likely you've modified the index.php file for your index that is why it would do this on only that page, see if the table widths are set to 100% at the bottom of the page near the require footer.php bit

 

If not then check your includes/footer.php file for the same.

Link to comment
Share on other sites

Thanks for your help.

 

As you will find below, there is no width (related to my footer) indicated at the bottom of my index.php.

 

The footer.php file seems to be fine, all the width are set to 100%

 

 

thanks

pat

<!-- 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 //-->

 

</body>

 

 

</html>

<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

Link to comment
Share on other sites

try changing it to: width="100%"

remove: <?php echo BOX_WIDTH; ?>

in the footer, I'm not too sure other than that but seen as it's only one page I'd say it's something wrong with them, if not try changing them all to width="100%" within index.php, the footer has to be set aswell as others because it's pulled from within different pages & many tables which makes it complex, it could be anywhere.

Link to comment
Share on other sites

I tried your solution and others and it doesn't make any difference. It's only on the homepage that I face the problem.

 

Any other idea ?

 

Thanks

pat :'(

 

Take a look at your Best Sellers code. Appears to be extra closing braces at the end.

 

<!-- best_sellers //-->

         <tr>
           <td>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
 <tr>
   <td height="14" class="infoBoxHeading"><img src="images/infobox/corner_right_left.gif" border="0" alt="" width="11" height="14"></td>
   <td width="100%" height="14" class="infoBoxHeading">Bestsellers</td>
   <td height="14" class="infoBoxHeading" nowrap><img src="images/pixel_trans.gif" border="0" alt="" width="11" height="14"></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">
 <tr>
   <td><img src="images/pixel_trans.gif" border="0" alt="" width="100%" height="1"></td>
 </tr>
 <tr>
   <td class="boxText"><table border="0" width="100%" cellspacing="0" cellpadding="1"><tr><td class="infoBoxContents" valign="top">01.</td><td class="infoBoxContents"><a href="http://clubfitting.net/product_info.php?products_id=72&osCsid=3e766f59deaf0a7edfaf890536946b4f">Grafalloy Pro Launch 45</a></td></tr></table></td>

 </tr>
 <tr>
   <td><img src="images/pixel_trans.gif" border="0" alt="" width="100%" height="1"></td>
 </tr>
</table>
</td>
 </tr>
</table>
           </td>
         </tr>

<!-- best_sellers_eof //-->

 

Make a copy of your catalog/includes/boxes/best_sellers.php then remove the last

 

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

 

hth

GEOTEX from Houston, TX

 

(George)

Link to comment
Share on other sites

Hereunder is a copy of my bestseller.php file, there was no </table> at the end....

I deleted the two other recommended lines : it doesn't make any difference.

 

I added a "what's new box" and you will observe that the footer doesn't go to the bottom of the page, but just beneath the "latest adds-on box".

 

Your help is gratefully appreciated

 

pat

 

<?php

/*

$Id: best_sellers.php,v 1.21 2003/06/09 22:07:52 hpdl Exp $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2003 osCommerce

 

Released under the GNU General Public License

*/

 

if (isset($current_category_id) && ($current_category_id > 0)) {

$best_sellers_query = tep_db_query("select distinct p.products_id, pd.products_name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c where p.products_status = '1' and p.products_ordered > 0 and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and '" . (int)$current_category_id . "' in (c.categories_id, c.parent_id) order by p.products_ordered desc, pd.products_name limit " . MAX_DISPLAY_BESTSELLERS);

} else {

$best_sellers_query = tep_db_query("select distinct p.products_id, pd.products_name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_ordered > 0 and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' order by p.products_ordered desc, pd.products_name limit " . MAX_DISPLAY_BESTSELLERS);

}

 

if (tep_db_num_rows($best_sellers_query) >= MIN_DISPLAY_BESTSELLERS) {

?>

<!-- best_sellers //-->

<tr>

<td>

<?php

$info_box_contents = array();

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

 

new infoBoxHeading($info_box_contents, false, false);

 

$rows = 0;

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

while ($best_sellers = tep_db_fetch_array($best_sellers_query)) {

$rows++;

$bestsellers_list .= '<tr><td class="infoBoxContents" valign="top">' . tep_row_number_format($rows) . '.</td><td class="infoBoxContents"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $best_sellers['products_id']) . '">' . $best_sellers['products_name'] . '</a></td></tr>';

}

$bestsellers_list .= '</table>';

 

$info_box_contents = array();

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

 

new infoBox($info_box_contents);

?>

 

<!-- best_sellers_eof //-->

<?php

}

?>

Link to comment
Share on other sites

You added the box to the left column, so doesn't change anything.

 

Anyway, checked my original file against the one you posted. Same version, but I have the following at the end of the file:

 

    new infoBox($info_box_contents);
?>
           </td>
         </tr>
<!-- best_sellers_eof //-->
<?php
 }
?>

 

I looked originally at the source code on your displayed page, so saw something different than what is actually supposed to be there. Try this and see if it clears up the problem, as just about has to be with the best_sellers.php file.

GEOTEX from Houston, TX

 

(George)

Link to comment
Share on other sites

The only other possible error I can see is that your footer.php appears to be inserted after the </body> tag on the main page. It also shows up that way on other pages, so don't know if that will make a difference or not. I also still see what appears to be extra closing table row and cell tags.

GEOTEX from Houston, TX

 

(George)

Link to comment
Share on other sites

I tried to move it up and down the body tag, no difference at all.

 

When I look at the product pages, where the footer is correctly position, the footer code is exactly the same as in the homepage. I don't think the problem is in the index.php file, the truth is elsewhere :)

 

 

Pat

Link to comment
Share on other sites

The problem is fixed. Thanks to the mates who helped me

 

Pat

 

 

How to fix the prob ?

I added </table></td> before the php call :

 

<!-- footer //-->

</table></td>

<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>

<!-- footer_eof //-->

 

See you :thumbsup:

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...