Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How to set the width of osCommerce pages


ChrisJChrisJ

Recommended Posts

On a default osC you would have to modify all the files in the catalog folder

Install this contribution and you will be ok

 

The_Bear

 

I am having trouble downloading this. Please tell me, waht is required to modify the files? I'm not using all the files, and I've removed everything in the right & left columns, so how tough would it be to modify each page to 750?

Link to comment
Share on other sites

In your header.php file, before the first existing table, put

<table width="750" cellspacing="0" cellpadding="0">
<tr>
<td>

and then at the end of the includes/footer.php file but

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

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

In your header.php file, before the first existing table, put
<table width="750" cellspacing="0" cellpadding="0">
<tr>
<td>

and then at the end of the includes/footer.php file but

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

 

Jack

 

Thank you for your assistance. I tried your suggestion, but I must be putting the code in the wring place. Your assistance would be greatly appreciated. I've copied the first part of the header.php code here. Can you show me where your header.php file code (table width="750"...etc.) goes in the existing file?

<?php

/*

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

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

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');

}

?>

<!-- start of grey box --> <table border="0"cellpadding="5" cellspacing="0" width="100%">

<tr>

<td>

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

<tr>

 

 

And could you please tell me where the code you've suggested ( </td> </tr> </table> ) goes in the footer.php file? I've listed the last part of that file below. Thank you.

 

<br>

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

<tr>

<td align="center" class="smallText">

 

<?php

/*

The following copyright announcement can only be

appropriately modified or removed if the layout of

the site theme has been modified to distinguish

itself from the default osCommerce-copyrighted

theme.

 

For more information please read the following

Frequently Asked Questions entry on the osCommerce

support site:

 

http://www.oscommerce.com/community.php/faq,26/q,50

 

Please leave this comment intact together with the

following copyright announcement.

*/

 

//echo FOOTER_TEXT_BODY

?>

</td>

</tr>

</table>

<?php

{

?>

 

<br>

<?php

}

?>

Link to comment
Share on other sites

In your header.php file, before the first existing table, put
<table width="750" cellspacing="0" cellpadding="0">
<tr>
<td>

and then at the end of the includes/footer.php file but

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

 

Jack

 

I just tried it and it worked fine

 

At the very top of the html section of your header.php file above the very first existing TABLE tag

 

Mine looks like this (comments inserted to show you what's what)

<LINK HREF="../stylesheet.css" REL="stylesheet" TYPE="text/css">

<!--this is the new bit-->
<table width="750" cellspacing="0" cellpadding="0">
<tr>
<td>
<!--this is the existing bit-->
<TABLE BORDER="0" WIDTH="100%" CELLSPACING="0" CELLPADDING="0">
 
<TR CLASS="header">

 

Then in footer.php

<!--this is the existing bit-->
<table border="0" width="100%" cellspacing="0" cellpadding="0">
 <tr>
   <td align="center"><?php echo tep_display_banner('static', $banner); ?></td>
 </tr>
</table>
<!--this is the new bit-->
</td>
</tr>
</table>
<!--end of new bit-->
<?php
 }
?>

Link to comment
Share on other sites

In your header.php file, before the first existing table, put
<table width="750" cellspacing="0" cellpadding="0">
<tr>
<td>

and then at the end of the includes/footer.php file but

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

 

Jack

 

I just tried it and it worked fine

 

At the very top of the html section of your header.php file above the very first existing TABLE tag

 

Mine looks like this (comments inserted to show you what's what)

<LINK HREF="../stylesheet.css" REL="stylesheet" TYPE="text/css">

<!--this is the new bit-->
<table width="750" cellspacing="0" cellpadding="0">
<tr>
<td>
<!--this is the existing bit-->
<TABLE BORDER="0" WIDTH="100%" CELLSPACING="0" CELLPADDING="0">
 
<TR CLASS="header">

 

Then in footer.php

<!--this is the existing bit-->
<table border="0" width="100%" cellspacing="0" cellpadding="0">
 <tr>
   <td align="center"><?php echo tep_display_banner('static', $banner); ?></td>
 </tr>
</table>
<!--this is the new bit-->
</td>
</tr>
</table>
<!--end of new bit-->
<?php
 }
?>

 

Some of my existing code is uppercase because I have dreamweaver set that way.

If you have dreamweaver you can rename the header.php to header.html and play around with it there then copy the html lines that you want to use back to the php file. I hope that doesn't confuse things more :)

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...