jcroson Posted July 8, 2003 Share Posted July 8, 2003 This is quite a noob question, but then, I'm a noob. I want to modify the initial page in my shop so that when you first come to it, it will only show certain boxes, but then when you click on a shopping item, or select from the products list, you get them. Example would be, first page only shows products, manufacturers, and information. When anything is selected on the page, the rest of the boxes appear. I know that I can comment out boxes in column_right.php and column_left.php, but that won't do it. Maybe there's a mod? JC John Croson Technology Operations Manager Racine Art Museum Link to comment Share on other sites More sharing options...
jcroson Posted July 8, 2003 Author Share Posted July 8, 2003 I just renamed my index.php to shop.php, copied that to index.php, and hacked the *poop* out of it. Had to update application_top.php to reflect the change of define('FILENAME_DEFAULT', 'shop.php'); . Move all includes/languages/*language*/index.php to shop.php, and ended up with this as my index.php: <?php /* $Id: index.php JTC 7-8-2003 This is a modified version of shop.php to allow for a "Welcome page" that is a more minimal approach, from a disign standpoint. */ require('includes/application_top.php'); // the following cPath references come from application_top.php $category_depth = 'top'; if (isset($cPath) && tep_not_null($cPath)) { $categories_products_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_TO_CATEGORIES . " where categories_id = '" . $current_category_id . "'"); $cateqories_products = tep_db_fetch_array($categories_products_query); if ($cateqories_products['total'] > 0) { $category_depth = 'products'; // display products } else { $category_parent_query = tep_db_query("select count(*) as total from " . TABLE_CATEGORIES . " where parent_id = '" . $current_category_id . "'"); $category_parent = tep_db_fetch_array($category_parent_query); if ($category_parent['total'] > 0) { $category_depth = 'nested'; // navigate through the categories } else { $category_depth = 'products'; // category has no products, but display the 'no products' message } } } require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_DEFAULT); ?> <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"> <html <?php echo HTML_PARAMS; ?>> <head> <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>"> <title><?php echo TITLE; ?></title> <base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>"> <link rel="stylesheet" type="text/css" href="stylesheet.css"> <SCRIPT LANGUAGE="JavaScript1.2" SRC="includes/menu_animation.js"></SCRIPT></head> <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0"> <!-- coolMenu //--> <?php require(DIR_WS_INCLUDES . 'coolmenu.php'); ?> <!-- coolMenu_eof //--> <!-- header //--> <?php require(DIR_WS_INCLUDES . 'header.php'); ?> <!-- header_eof //--> <!-- body //--> <table border="0" width="100%" cellspacing="3" cellpadding="3"> <tr> <td width="125" valign="top"><table border="0" width="125" cellspacing="0" cellpadding="2"> <!-- left_navigation //--> <?php if ( (USE_CACHE == 'true') && !defined('SID')) { echo tep_cache_categories_box(); } else { // include(DIR_WS_BOXES . 'categories.php'); include(DIR_WS_BOXES . 'coolmenu.php'); } if ( (USE_CACHE == 'true') && !defined('SID')) { echo tep_cache_manufacturers_box(); } else { include(DIR_WS_BOXES . 'manufacturers.php'); } ?> <!-- left_navigation_eof //--> </table></td> <!-- body_text //--> <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">Welcome!</td> <td class="pageHeading" align="right"><img src="images/table_background_default.gif" border="0" alt="Welcome!" title=" Welcome! " width="57" height="38.095"></td> </tr> </table></td> </tr> <tr> <td><img src="images/pixel_trans.gif" border="0" alt="" width="100%" height="10"></td> </tr> <tr> <td><table border="0" width="75%" cellspacing="0" cellpadding="0"> <tr> <td class="main"><br> Here is an example of a longer link and what it looks like. Again, this text is being used as a place holder and should not be read. It will now repeat. This text is not meant to be read. This is being used as a place holder. Please feel free to change this by inserting your own information. Here is an example of a link and what it looks like. Again, this text is being used as a place holder and should not be read. It will now repeat. This text is not meant to be read. This is being used as a place holder. Please feel free to change this by inserting your own information. Here is an example of a link and what it looks like. Again, this text is being used as a place holder and should not be read. It will now repeat.<br><br><br> Here is an example of a longer link and what it looks like. Again, this text is being used as a place holder and should not be read. It will now repeat. This text is not meant to be read. This is being used as a place holder. Please feel free to change this by inserting your own information. Here is an example of a link and what it looks like. Again, this text is being used as a place holder and should not be read. It will now repeat. This text is not meant to be read. This is being used as a place holder. Please feel free to change this by inserting your own information. Here is an example of a link and what it looks like. Again, this text is being used as a place holder and should not be read. It will now repeat.<br> </td> </tr> </table></td> </tr> </table></td> <!-- body_text_eof //--> <td width="125" valign="top"><table border="0" width="125" cellspacing="0" cellpadding="2"> <!-- right_navigation //--> <?php require(DIR_WS_BOXES . 'donate.php'); ?> <!-- right_navigation_eof //--> </table></td> </tr> </table> <!-- body_eof //--> <!-- footer //--> <?php require(DIR_WS_INCLUDES . 'footer.php'); ?> <!-- footer_eof //--> <br> </body> </html> <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?> Just for the boards info... John Croson Technology Operations Manager Racine Art Museum Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.