ouroborous Posted May 8, 2008 Share Posted May 8, 2008 Tried looking around for help with this and I'm reading the documentation, but I can't see what I'm doing wrong. I have an infobox I want to add to the right column. The other boxes are all inside a table so that they fit correctly, but when I add this to the table it breaks the layout. If I take it out of the table it works but it pushes the width further then the header image. Hope this makes sense. Here's the code before the infobox and then the code after I add it into the table. Thanks. ?> <table border="0"cellspacing="0" cellpadding="0" class="box_width_right"> <tr><td><?php echo tep_draw_separator('spacer.gif', '3', '1'); ?></td> <td width="100%"> <table border="0" cellspacing="0" cellpadding="0"> <?php // ------------------------------------------------- if (isset($HTTP_GET_VARS['products_id'])) { if (tep_session_is_registered('customer_id')) { $check_query = tep_db_query("select count(*) as count from " . TABLE_CUSTOMERS_INFO . " where customers_info_id = '" . (int)$customer_id . "' and global_product_notifications = '1'"); $check = tep_db_fetch_array($check_query); if ($check['count'] > 0) { include(DIR_WS_BOXES . 'best_sellers.php'); } else { include(DIR_WS_BOXES . 'product_notifications.php'); } } else { include(DIR_WS_BOXES . 'product_notifications.php'); } } else { include(DIR_WS_BOXES . 'best_sellers.php'); } // ------------------------------------------------- //require(DIR_WS_BOXES . 'reviews.php'); // ------------------------------------------------- if (isset($HTTP_GET_VARS['products_id'])) { if (basename($PHP_SELF) != FILENAME_TELL_A_FRIEND) include(DIR_WS_BOXES . 'tell_a_friend.php'); } else { include(DIR_WS_BOXES . 'specials.php'); } ?> </table> </td> </tr> </table> Here's the code after I add the infobox and when everything breaks shape: ?> <table border="0"cellspacing="0" cellpadding="0" class="box_width_right"> <tr><td><?php echo tep_draw_separator('spacer.gif', '3', '1'); ?></td> <td width="100%"> <table border="0" cellspacing="0" cellpadding="0"> <?php // ------------------------------------------------- if (isset($HTTP_GET_VARS['products_id'])) { if (tep_session_is_registered('customer_id')) { $check_query = tep_db_query("select count(*) as count from " . TABLE_CUSTOMERS_INFO . " where customers_info_id = '" . (int)$customer_id . "' and global_product_notifications = '1'"); $check = tep_db_fetch_array($check_query); if ($check['count'] > 0) { include(DIR_WS_BOXES . 'best_sellers.php'); } else { include(DIR_WS_BOXES . 'product_notifications.php'); } } else { include(DIR_WS_BOXES . 'product_notifications.php'); } } else { include(DIR_WS_BOXES . 'best_sellers.php'); } // ------------------------------------------------- //require(DIR_WS_BOXES . 'reviews.php'); // ------------------------------------------------- if (isset($HTTP_GET_VARS['products_id'])) { if (basename($PHP_SELF) != FILENAME_TELL_A_FRIEND) include(DIR_WS_BOXES . 'tell_a_friend.php'); } else { include(DIR_WS_BOXES . 'specials.php'); } ?> </table> </td> </tr> <tr><td><?php echo tep_draw_separator('spacer.gif', '3', '1'); ?></td> <td><a href="<?php echo tep_href_link('index.php?cPath=3')?>"><?php include(DIR_WS_BOXES . 'feedback.php'); ?></a></td> </tr> </table> Link to comment Share on other sites More sharing options...
Guest Posted May 22, 2008 Share Posted May 22, 2008 Tried looking around for help with this and I'm reading the documentation, but I can't see what I'm doing wrong. I have an infobox I want to add to the right column. The other boxes are all inside a table so that they fit correctly, but when I add this to the table it breaks the layout. If I take it out of the table it works but it pushes the width further then the header image. Hope this makes sense. Here's the code before the infobox and then the code after I add it into the table. Thanks. ?> <table border="0"cellspacing="0" cellpadding="0" class="box_width_right"> <tr><td><?php echo tep_draw_separator('spacer.gif', '3', '1'); ?></td> <td width="100%"> <table border="0" cellspacing="0" cellpadding="0"> <?php // ------------------------------------------------- if (isset($HTTP_GET_VARS['products_id'])) { if (tep_session_is_registered('customer_id')) { $check_query = tep_db_query("select count(*) as count from " . TABLE_CUSTOMERS_INFO . " where customers_info_id = '" . (int)$customer_id . "' and global_product_notifications = '1'"); $check = tep_db_fetch_array($check_query); if ($check['count'] > 0) { include(DIR_WS_BOXES . 'best_sellers.php'); } else { include(DIR_WS_BOXES . 'product_notifications.php'); } } else { include(DIR_WS_BOXES . 'product_notifications.php'); } } else { include(DIR_WS_BOXES . 'best_sellers.php'); } // ------------------------------------------------- //require(DIR_WS_BOXES . 'reviews.php'); // ------------------------------------------------- if (isset($HTTP_GET_VARS['products_id'])) { if (basename($PHP_SELF) != FILENAME_TELL_A_FRIEND) include(DIR_WS_BOXES . 'tell_a_friend.php'); } else { include(DIR_WS_BOXES . 'specials.php'); } ?> </table> </td> </tr> </table> Here's the code after I add the infobox and when everything breaks shape: ?> <table border="0"cellspacing="0" cellpadding="0" class="box_width_right"> <tr><td><?php echo tep_draw_separator('spacer.gif', '3', '1'); ?></td> <td width="100%"> <table border="0" cellspacing="0" cellpadding="0"> <?php // ------------------------------------------------- if (isset($HTTP_GET_VARS['products_id'])) { if (tep_session_is_registered('customer_id')) { $check_query = tep_db_query("select count(*) as count from " . TABLE_CUSTOMERS_INFO . " where customers_info_id = '" . (int)$customer_id . "' and global_product_notifications = '1'"); $check = tep_db_fetch_array($check_query); if ($check['count'] > 0) { include(DIR_WS_BOXES . 'best_sellers.php'); } else { include(DIR_WS_BOXES . 'product_notifications.php'); } } else { include(DIR_WS_BOXES . 'product_notifications.php'); } } else { include(DIR_WS_BOXES . 'best_sellers.php'); } // ------------------------------------------------- //require(DIR_WS_BOXES . 'reviews.php'); // ------------------------------------------------- if (isset($HTTP_GET_VARS['products_id'])) { if (basename($PHP_SELF) != FILENAME_TELL_A_FRIEND) include(DIR_WS_BOXES . 'tell_a_friend.php'); } else { include(DIR_WS_BOXES . 'specials.php'); } ?> </table> </td> </tr> <tr><td><?php echo tep_draw_separator('spacer.gif', '3', '1'); ?></td> <td><a href="<?php echo tep_href_link('index.php?cPath=3')?>"><?php include(DIR_WS_BOXES . 'feedback.php'); ?></a></td> </tr> </table> Hi there, Maybe this guide in the oscommerce knowledgebase will help you. http://www.oscommerce.info/kb/osCommerce/C...g_Area/Boxes/66 Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.