Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Center Shop question


RBQ

Recommended Posts

Hi, i'm having a problem with the center shop contribution.

When i select a product categorie when it only has products in it works fine, but

when it contains sub cathegories the size of my page is going wide.

 

I also removed the pictures but can't find what the problem is,

can anyone take a look please?

 

foto-papier.com

Link to comment
Share on other sites

The first table in your headers file is set to 100%. Change this to the width of the next table, which is 750, or maybe a little wider if you are using borders.

 

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

The first table in your headers file is set to 100%. Change this to the width of the next table, which is 750, or maybe a little wider if you are using borders.

 

Jack

Thnx for the reply,

 

I did what you said, but then the shop went to the left of the page, and the problem isn't solved.

 

This is my header.php:

 

<?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 (c) 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');
 }   

///////////////////    
///////////////////        
// BOF: WebMakers.com Added: Center Shop
// This goes before any other table of the shop
//
// Is center Shop ON/OFF ?
// This setting is located in includes/languages/english/center_shop.php
///////////////////

   if ( CENTER_SHOP_ON == '1' ) {

///////////////////   
// Background Color ON/OFF and CellPadding for around the shop?
// These settings are located in includes/languages/english/center_shop.php
///////////////////

     if ( CENTER_SHOP_BACKGROUND_ON == '1' ) {
?>
   <table width="100%" cellpadding="<?php echo CENTER_SHOP_PADDING; ?>" cellspacing="0" border="0" bgcolor="<?php echo CENTER_SHOP_BACKGROUND_COLOR_OUT; ?>">
     <tr><td>
<?php
     }
   }
   
///////////////////    
// Shop Width Size and Shop Background Color
// These settings are located in includes/languages/english/center_shop.php
///////////////////
?>
   <table CELLSPACING="4" CELLPADDING="6" BORDER="3" width="<?php echo CENTER_SHOP_WIDTH; ?>" align="center" BGCOLOR="<?php echo CENTER_SHOP_BACKGROUND_COLOR; ?>">
     <tr><td BGColor="FFFFFF">
<?php
 
///////////////////
// The rest of this <td> statement is located at the end of footer.php
///////////////////
?>

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

<?php
///////////////////
// BOF: Header Image and Link
// These settings are located in includes/languages/english/center_shop.php
///////////////////
?>

<table border="0" width="100%" cellspacing="0" cellpadding="0">
 <tr class="header">
 
<?php
 if (HEADER_IMG_LINK_ON=='1') {
?>
   <td valign="middle"><?php echo '<a href="' . HEADER_IMG_LINK . '">' . tep_image(DIR_WS_IMAGES . HEADER_IMG_PIC, HEADER_IMG_ALT) . '</a><BR>'; ?></td>
<?php
 } else {
?>
   <td valign="middle"><?php echo tep_image(DIR_WS_IMAGES . HEADER_IMG_PIC, HEADER_IMG_ALT) . '<BR>'; ?></td>
<?php
 }
 
///////////////////
///////////////////
// EOF: Header Image and Link
// These settings are located in includes/languages/english/center_shop.php
///////////////////
?>

   <td align="right" valign="bottom"><?php echo '<a href="' . tep_href_link(FILENAME_ACCOUNT, '', 'SSL') . '">' . tep_image(DIR_WS_IMAGES . 'header_account.gif', HEADER_TITLE_MY_ACCOUNT) . '</a>  <a href="' . tep_href_link(FILENAME_SHOPPING_CART) . '">' . tep_image(DIR_WS_IMAGES . 'header_cart.gif', HEADER_TITLE_CART_CONTENTS) . '</a>  <a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '">' . tep_image(DIR_WS_IMAGES . 'header_checkout.gif', HEADER_TITLE_CHECKOUT) . '</a>'; ?>  </td>
 </tr>
</table>
<table border="0" width="100%" cellspacing="0" cellpadding="1">
 <tr class="headerNavigation">
   <td class="headerNavigation">  <?php echo $breadcrumb->trail(' » '); ?></td>
   <td align="right" class="headerNavigation"><?php if (tep_session_is_registered('customer_id')) { ?><a href="<?php echo tep_href_link(FILENAME_LOGOFF, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_LOGOFF; ?></a>  |  <?php } ?><a href="<?php echo tep_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_MY_ACCOUNT; ?></a>  |  <a href="<?php echo tep_href_link(FILENAME_SHOPPING_CART); ?>" class="headerNavigation"><?php echo HEADER_TITLE_CART_CONTENTS; ?></a>  |  <a href="<?php echo tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_CHECKOUT; ?></a>   </td>
 </tr>
</table>
<?php
 if (isset($HTTP_GET_VARS['error_message']) && tep_not_null($HTTP_GET_VARS['error_message'])) {
?>
<table border="0" width="100%" cellspacing="0" cellpadding="2">
 <tr class="headerError">
   <td class="headerError"><?php echo htmlspecialchars(urldecode($HTTP_GET_VARS['error_message'])); ?></td>
 </tr>
</table>
<?php
 }

 if (isset($HTTP_GET_VARS['info_message']) && tep_not_null($HTTP_GET_VARS['info_message'])) {
?>
<table border="0" width="100%" cellspacing="0" cellpadding="2">
 <tr class="headerInfo">
   <td class="headerInfo"><?php echo htmlspecialchars($HTTP_GET_VARS['info_message']); ?></td>
 </tr>
</table>
<?php
 }
?>

Link to comment
Share on other sites

I looked at your site and the table width on your index page is set to 750. When you click on a category page, the width is set to 790 farther down the page. This is the problem. If you have a table with with 100 and place another table within it and set the inner table to width 200, then the width of the first table will change to accomodate it. That's what is happening here.

 

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

I just installed CENTER SHOP and my installation (header.php) doesn't look anything like the above. I installed it to try to get the same look/feel as foto-papier.com (ie the colored page background and the white table background.

 

Did I grab an old version or something?

 

Lobo :huh:

Link to comment
Share on other sites

I looked at your site and the table width on your index page is set to 750. When you click on a category page, the width is set to 790 farther down the page.  This is the problem. If you have a table with with 100 and place another table within it and set the inner table to width 200, then the width of the first table will change to accomodate it.  That's what is happening here.

 

Jack

But i can't find the 790, and when i click on a categorie, the width is 1150.

I realy don't know where to look...

 

Is the categorie a diferent file?

Link to comment
Share on other sites

It's controlled by your index.php file, unless you are not using a standard shop. Find this code in that file. It's where the 790 is coming from.

<!-- body_text //-->
<?php
 if ($category_depth == 'nested') {
   $category_query = tep_db_query("select cd.categories_name, c.categories_image from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.categories_id = '" . (int)$current_category_id . "' and cd.categories_id = '" . (int)$current_category_id . "' and cd.language_id = '" . (int)$languages_id . "'");
   $category = tep_db_fetch_array($category_query);
?>
   <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0">
     <tr>
       <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
         <tr>
           <td class="pageHeading"><?php echo HEADING_TITLE; ?></td>

 

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...