Guest Posted January 28, 2007 Posted January 28, 2007 This is my first posting and the set up is a little daunting. If anyone could assist it would be greatly appreciated. I anm struggling with the home page, I was doing well, but have seemed to go wrong whem addeing additional text, and it now seems to be lost. Also, can anyone offer help in how I can resize the logo and to what size is needed. Regards from Oxford Wirth thanks Peter <?php /* $Id: index.php,v 1.1 2003/06/11 17:38:00 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2003 osCommerce Released under the GNU General Public License */ define('TEXT_MAIN', '<td class="main"><B>Janitorman</B>offer a range of quality cleaning and hygiene products and support services.<BR>Our everyday low pricing policy <B>guarantees to save you money</B>, so start shopping now and see how much you can save.........</td><B>The JANITORMAN philosopy is simple</B>....Great products at sensible prices,supported by the highest level of personal service and integrety.<p><I>The Janitorman Network</I> is a network of indepedent specialist local distributors of cleaning and hygiene products located throughout the country providing a professional, personalised service in a world dominated by large corporations.<p> <b>PRODUCT CHOICE</b><br>Janitorman offer a comprehensive range of key innovative products, carefully formulated to perform at the highest levels in today’s high-speed environment. Most products are multi-tasking, thereby reducing the number of products used and offering the user real value for money.<p><B>FREE DELIVERY</b><br> We offer <B>FREE</B> delivery with no minimum order value to all our customers.<p><b>COMPETITIVE PRICING AND INTEGRITY</B><BR>We are committed to continuous cost-effective & ethical purchasing and business management principles to ensure that our pricing reflects our “sensible pricing policy”.<P><b>CUSTOMER SUPPORT</B><BR>We are committed to provide all our customers with same high level of service whether you are a small or large business, government and educational institution, cleaning service company, care home, publican or industrial caterer.<br>We believe that these goals are the means to best achieve customer satisfaction.<p><b>HEALTH & SAFETY</B><br>We offer on-site training, product usage information and literature and specialist expertise to help our customers meet their obligations under Health & Safety legislation. (COSHH, Environmental Protection Act, Food Act, Duty of Care,etc).</b>'); define('TABLE_HEADING_NEW_PRODUCTS', 'New Products For %s'); define('TABLE_HEADING_UPCOMING_PRODUCTS', 'Upcoming Products'); define('TABLE_HEADING_DATE_EXPECTED', 'Date Expected'); if ( ($category_depth == 'products') || (isset($HTTP_GET_VARS['manufacturers_id'])) ) { define('HEADING_TITLE', 'Let\'s See What We Have Here'); define('TABLE_HEADING_IMAGE', ''); define('TABLE_HEADING_MODEL', 'Model'); define('TABLE_HEADING_PRODUCTS', 'Product Name'); define('TABLE_HEADING_MANUFACTURER', 'Manufacturer'); define('TABLE_HEADING_QUANTITY', 'Quantity'); define('TABLE_HEADING_PRICE', 'Price'); define('TABLE_HEADING_WEIGHT', 'Weight'); define('TABLE_HEADING_BUY_NOW', 'Buy Now'); define('TEXT_NO_PRODUCTS', 'There are no products to list in this category.'); define('TEXT_NO_PRODUCTS2', 'There is no product available from this manufacturer.'); define('TEXT_NUMBER_OF_PRODUCTS', 'Number of Products: '); define('TEXT_SHOW', '<b>Show:</b>'); define('TEXT_BUY', 'Buy 1 \''); define('TEXT_NOW', '\' now'); define('TEXT_ALL_CATEGORIES', 'All Categories'); define('TEXT_ALL_MANUFACTURERS', 'All Manufacturers'); } elseif ($category_depth == 'top') { define('HEADING_TITLE', 'What\'s New Here?'); } elseif ($category_depth == 'nested') { define('HEADING_TITLE', 'Categories'); } ?>
Brooke Posted January 28, 2007 Posted January 28, 2007 change this in today’s high-speed to this in today\’s high-speed and see if that fixes your problem with the index page im not entirely sure what youre asking about the logo. you need to be a bit more specific. What? Yeah, I can do that.
Guest Posted January 29, 2007 Posted January 29, 2007 change this in today’s high-speedto this in today\’s high-speed and see if that fixes your problem with the index page im not entirely sure what youre asking about the logo. you need to be a bit more specific. Brroke Many Thanks for your response. I have sorted the text problem out. Regarding the logo. Logo size - height (www.janitorman.net) need reducing. Can you offer any advice here. best regards Peter
jonquil Posted January 29, 2007 Posted January 29, 2007 BrrokeRegarding the logo. Logo size - height (www.janitorman.net) need reducing. Can you offer any advice here. best regards Peter Peter, are you looking for someone to edit your logo for you and reduce it? I can do that. Just give me the pixel dimensions you wish. jon It's all just ones and zeros....
Brooke Posted January 29, 2007 Posted January 29, 2007 here you go, try that What? Yeah, I can do that.
Guest Posted January 30, 2007 Posted January 30, 2007 Peter, are you looking for someone to edit your logo for you and reduce it? I can do that. Just give me the pixel dimensions you wish. jon Jon Yes if you could help it would be greatly appreciated. I am not sure of the size in pixels bit lets say similar to the standard OS Commerce logo. Peter
jonquil Posted January 30, 2007 Posted January 30, 2007 Have you seen the great png file Brooke did for you? Right Click on her graphic and View Image. Save that file to your hard drive. You can open that in Photoshop, do Edit>>Image>>Image Size and proportionally alter the dimension as you see fit. Then do File >> Save for the Web >> as a jpg to preserve that nice shadow effect. jon It's all just ones and zeros....
Guest Posted January 30, 2007 Posted January 30, 2007 here you go, try that Brooke That is fantastic. Firstly, many thanks for your trouble. Secondly, is this something I could have done myself. What am I missing. Regards Peter
Guest Posted January 30, 2007 Posted January 30, 2007 Have you seen the great png file Brooke did for you? Right Click on her graphic and View Image. Save that file to your hard drive. You can open that in Photoshop, do Edit>>Image>>Image Size and proportionally alter the dimension as you see fit. Then do File >> Save for the Web >> as a jpg to preserve that nice shadow effect. jon Jon Many thanks, for your help. No infact I have only just seen Brooke's reply. so hopfully with your held I should be in a position to move forward. Thanks again Peter I
Brooke Posted January 30, 2007 Posted January 30, 2007 BrookeThat is fantastic. Firstly, many thanks for your trouble. Secondly, is this something I could have done myself. What am I missing. Regards Peter i just grabbed your logo and dragged it into photoshop, like jonquil explained. if you dont have photoshop there are other image editing programs out there. GIMPshop might be a good option for you http://www.gimpshop.net/ What? Yeah, I can do that.
Guest Posted January 31, 2007 Posted January 31, 2007 i just grabbed your logo and dragged it into photoshop, like jonquil explained. if you dont have photoshop there are other image editing programs out there. GIMPshop might be a good option for you http://www.gimpshop.net/ Brooke You have been a great help. I have got hold of photoshop and resized as you recommended. I seem to have not been able to get rid of the grey background. Do you have any suggestions as to how I might be able to do this, or make the background stretch across the whole of the page.My Webpage Peter
Brooke Posted January 31, 2007 Posted January 31, 2007 BrookeYou have been a great help. I have got hold of photoshop and resized as you recommended. I seem to have not been able to get rid of the grey background. Do you have any suggestions as to how I might be able to do this, or make the background stretch across the whole of the page.My Webpage Peter im not sure what grey background youre talking about. i dont see a grey background. What? Yeah, I can do that.
jonquil Posted January 31, 2007 Posted January 31, 2007 Me neither :) No gray background :) In FireFox. HowEVer, Some browsers, like IE, will not render a PNG file correctly. It will, in fact, show a gray background. Your logo should be a jpg, not a png. "Resize%20Wizard-1.png". Read my instructions again :) You can open that in Photoshop, do Edit>>Image>>Image Size and proportionally alter the dimension as you see fit. Then do File >> Save for the Web >> as a jpg to preserve that nice shadow effect. jon It's all just ones and zeros....
Guest Posted January 31, 2007 Posted January 31, 2007 im not sure what grey background youre talking about. i dont see a grey background. If not grey ,the block. am i able to lift the logo from the block in photoshop or stretch the block across the whole page. Any ideas why I have a ) above the logo regards Peter
Brooke Posted January 31, 2007 Posted January 31, 2007 If not grey ,the block. am i able to lift the logo from the block in photoshop or stretch the block across the whole page.Any ideas why I have a ) above the logo regards Peter ahh the infamous png transparency issue. jonquil is right on. light bluish grey. i resaved it for you again, this time as a jpg. here you go your stray ( is in your header somewhere. you may have to post your code so we can see whats going on in there. What? Yeah, I can do that.
Guest Posted February 1, 2007 Posted February 1, 2007 ahh the infamous png transparency issue. jonquil is right on. light bluish grey. i resaved it for you again, this time as a jpg. here you go your stray ( is in your header somewhere. you may have to post your code so we can see whats going on in there. You guys are the best Thanks for taking the trouble to help. So I can learn from this. Should I only use jpg format for pictures in a website? What is your feeling. Here are the codes from header.phg. Are you able to see where the stray ) is coming from. Regards Peter <?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'); } } ?> <table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr class="header"> <td valign="middle"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image(DIR_WS_IMAGES . 'Resize Wizard-1.png', 'oscommerce') . '</a>'; ?></td> <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 } ?> :D
jonquil Posted February 1, 2007 Posted February 1, 2007 Peter, I think the stray ( is in your root index.php because it doesn't show up elsewhere. Can you post the first 25 or so lines of that file? Here is a link of GIF v JPG v PNG. Technically, your logo should be a gif because it is not a photograph and but some people don't know how to work in Index Colour versus RGB or CMYK nor do they understand that a matte (same colour as the background onto which the image will be viewed) must be applied before the file is finally saved as a gif. This is why many non-photograph images you see on the web look a bit odd, and why some gifs have shadow effects showing as solid black :) As well, many people do not work with PNG formats which, when saved a gifs, do not require changing the code to Index Colour. This said, if Brooke would be kind enough to take the fab PNG she made of your logo, Save for the Web as a GIF, apply a WHITE matte at 242 px width and save as "logo_janitorman.gif", then Bob's her uncle :) In your header.php, you need to change 2 things: From this: <?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image(DIR_WS_IMAGES . 'Resize Wizard-1.png', 'oscommerce') . '</a>'; ?></td> To this: <?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image(DIR_WS_IMAGES . 'logo_janitorman.gif', 'Janitorman') . '</a>'; ?></td> But wait for savvy Brooke :) jon It's all just ones and zeros....
Guest Posted February 2, 2007 Posted February 2, 2007 Peter, I think the stray ( is in your root index.php because it doesn't show up elsewhere. Can you post the first 25 or so lines of that file? Here is a link of GIF v JPG v PNG. Technically, your logo should be a gif because it is not a photograph and but some people don't know how to work in Index Colour versus RGB or CMYK nor do they understand that a matte (same colour as the background onto which the image will be viewed) must be applied before the file is finally saved as a gif. This is why many non-photograph images you see on the web look a bit odd, and why some gifs have shadow effects showing as solid black :) As well, many people do not work with PNG formats which, when saved a gifs, do not require changing the code to Index Colour. This said, if Brooke would be kind enough to take the fab PNG she made of your logo, Save for the Web as a GIF, apply a WHITE matte at 242 px width and save as "logo_janitorman.gif", then Bob's her uncle :) In your header.php, you need to change 2 things: From this: <?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image(DIR_WS_IMAGES . 'Resize Wizard-1.png', 'oscommerce') . '</a>'; ?></td> To this: <?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image(DIR_WS_IMAGES . 'logo_janitorman.gif', 'Janitorman') . '</a>'; ?></td> But wait for savvy Brooke :) jon
Guest Posted February 2, 2007 Posted February 2, 2007 Peter, I think the stray ( is in your root index.php because it doesn't show up elsewhere. Can you post the first 25 or so lines of that file? Here is a link of GIF v JPG v PNG. Technically, your logo should be a gif because it is not a photograph and but some people don't know how to work in Index Colour versus RGB or CMYK nor do they understand that a matte (same colour as the background onto which the image will be viewed) must be applied before the file is finally saved as a gif. This is why many non-photograph images you see on the web look a bit odd, and why some gifs have shadow effects showing as solid black :) As well, many people do not work with PNG formats which, when saved a gifs, do not require changing the code to Index Colour. This said, if Brooke would be kind enough to take the fab PNG she made of your logo, Save for the Web as a GIF, apply a WHITE matte at 242 px width and save as "logo_janitorman.gif", then Bob's her uncle :) In your header.php, you need to change 2 things: From this: <?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image(DIR_WS_IMAGES . 'Resize Wizard-1.png', 'oscommerce') . '</a>'; ?></td> To this: <?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image(DIR_WS_IMAGES . 'logo_janitorman.gif', 'Janitorman') . '</a>'; ?></td> But wait for savvy Brooke :) jon Jon Thanks Very interesting info Just breaking up for a weeks skiing. I'll be back and thanks for all your help Best regards Peter
jonquil Posted February 2, 2007 Posted February 2, 2007 Just breaking up for a weeks skiing.Peter You rat :( jon It's all just ones and zeros....
Guest Posted February 15, 2007 Posted February 15, 2007 You rat :( jon Jon Back from Skiing in Austria. Great time but snow whilst good, not as much as previous years...global warming is taking its toll I think. This is what I am showing in index.php Any ideas where the stray( is coming from. Regards again Peter <?php /* $Id: index.php,v 1.1 2003/06/11 17:37:59 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2003 osCommerce Released under the GNU General Public License */ 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 = '" . (int)$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 = '" . (int)$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"> </head> <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0"> <!-- header //--> <?php require(DIR_WS_INCLUDES . 'header.php'); ?> <!-- header_eof //--> <!-- body //--> <table border="0" width="100%" cellspacing="3" cellpadding="3"> <tr> <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2"> <!-- left_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_left.php'); ?> <!-- left_navigation_eof //--> </table></td> <!-- 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> <td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . $category['categories_image'], $category['categories_name'], HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <?php if (isset($cPath) && strpos('_', $cPath)) { // check to see if there are deeper categories within the current category $category_links = array_reverse($cPath_array); for($i=0, $n=sizeof($category_links); $i<$n; $i++) { $categories_query = tep_db_query("select count(*) as total from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . (int)$category_links[$i] . "' and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "'"); $categories = tep_db_fetch_array($categories_query); if ($categories['total'] < 1) { // do nothing, go through the loop } else { $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.categories_image, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . (int)$category_links[$i] . "' and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' order by sort_order, cd.categories_name"); break; // we've found the deepest category the customer is in } } } else { $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.categories_image, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . (int)$current_category_id . "' and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' order by sort_order, cd.categories_name"); } $number_of_categories = tep_db_num_rows($categories_query); $rows = 0; while ($categories = tep_db_fetch_array($categories_query)) { $rows++; $cPath_new = tep_get_path($categories['categories_id']); $width = (int)(100 / MAX_DISPLAY_CATEGORIES_PER_ROW) . '%'; echo ' <td align="center" class="smallText" width="' . $width . '" valign="top"><a href="' . tep_href_link(FILENAME_DEFAULT, $cPath_new) . '">' . tep_image(DIR_WS_IMAGES . $categories['categories_image'], $categories['categories_name'], SUBCATEGORY_IMAGE_WIDTH, SUBCATEGORY_IMAGE_HEIGHT) . '<br>' . $categories['categories_name'] . '</a></td>' . "\n"; if ((($rows / MAX_DISPLAY_CATEGORIES_PER_ROW) == floor($rows / MAX_DISPLAY_CATEGORIES_PER_ROW)) && ($rows != $number_of_categories)) { echo ' </tr>' . "\n"; echo ' <tr>' . "\n"; } } // needed for the new products module shown below $new_products_category_id = $current_category_id; ?> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td><?php include(DIR_WS_MODULES . FILENAME_NEW_PRODUCTS); ?></td> </tr> </table></td> </tr> </table></td> <?php } elseif ($category_depth == 'products' || isset($HTTP_GET_VARS['manufacturers_id'])) { // create column list $define_list = array('PRODUCT_LIST_MODEL' => PRODUCT_LIST_MODEL, 'PRODUCT_LIST_NAME' => PRODUCT_LIST_NAME, 'PRODUCT_LIST_MANUFACTURER' => PRODUCT_LIST_MANUFACTURER, 'PRODUCT_LIST_PRICE' => PRODUCT_LIST_PRICE, 'PRODUCT_LIST_QUANTITY' => PRODUCT_LIST_QUANTITY, 'PRODUCT_LIST_WEIGHT' => PRODUCT_LIST_WEIGHT, 'PRODUCT_LIST_IMAGE' => PRODUCT_LIST_IMAGE, 'PRODUCT_LIST_BUY_NOW' => PRODUCT_LIST_BUY_NOW); asort($define_list); $column_list = array(); reset($define_list); while (list($key, $value) = each($define_list)) { if ($value > 0) $column_list[] = $key; } $select_column_list = ''; for ($i=0, $n=sizeof($column_list); $i<$n; $i++) { switch ($column_list[$i]) { case 'PRODUCT_LIST_MODEL': $select_column_list .= 'p.products_model, '; break; case 'PRODUCT_LIST_NAME': $select_column_list .= 'pd.products_name, '; break; case 'PRODUCT_LIST_MANUFACTURER': $select_column_list .= 'm.manufacturers_name, '; break; case 'PRODUCT_LIST_QUANTITY': $select_column_list .= 'p.products_quantity, '; break; case 'PRODUCT_LIST_IMAGE': $select_column_list .= 'p.products_image, '; break; case 'PRODUCT_LIST_WEIGHT': $select_column_list .= 'p.products_weight, '; break; } } // show the products of a specified manufacturer if (isset($HTTP_GET_VARS['manufacturers_id'])) { if (isset($HTTP_GET_VARS['filter_id']) && tep_not_null($HTTP_GET_VARS['filter_id'])) { // We are asked to show only a specific category $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$HTTP_GET_VARS['filter_id'] . "'"; } else { // We show them all $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m where p.products_status = '1' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'"; } } else { // show the products in a given categorie if (isset($HTTP_GET_VARS['filter_id']) && tep_not_null($HTTP_GET_VARS['filter_id'])) { // We are asked to show only specific catgeory $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['filter_id'] . "' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$current_category_id . "'"; } else { // We show them all $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$current_category_id . "'"; } } if ( (!isset($HTTP_GET_VARS['sort'])) || (!ereg('[1-8][ad]', $HTTP_GET_VARS['sort'])) || (substr($HTTP_GET_VARS['sort'], 0, 1) > sizeof($column_list)) ) { for ($i=0, $n=sizeof($column_list); $i<$n; $i++) { if ($column_list[$i] == 'PRODUCT_LIST_NAME') { $HTTP_GET_VARS['sort'] = $i+1 . 'a'; $listing_sql .= " order by pd.products_name"; break; } } } else { $sort_col = substr($HTTP_GET_VARS['sort'], 0 , 1); $sort_order = substr($HTTP_GET_VARS['sort'], 1); $listing_sql .= ' order by '; switch ($column_list[$sort_col-1]) { case 'PRODUCT_LIST_MODEL': $listing_sql .= "p.products_model " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name"; break; case 'PRODUCT_LIST_NAME': $listing_sql .= "pd.products_name " . ($sort_order == 'd' ? 'desc' : ''); break; case 'PRODUCT_LIST_MANUFACTURER': $listing_sql .= "m.manufacturers_name " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name"; break; case 'PRODUCT_LIST_QUANTITY': $listing_sql .= "p.products_quantity " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name"; break; case 'PRODUCT_LIST_IMAGE': $listing_sql .= "pd.products_name"; break; case 'PRODUCT_LIST_WEIGHT': $listing_sql .= "p.products_weight " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name"; break; case 'PRODUCT_LIST_PRICE': $listing_sql .= "final_price " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name"; break; } } ?> <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> <?php // optional Product List Filter if (PRODUCT_LIST_FILTER > 0) { if (isset($HTTP_GET_VARS['manufacturers_id'])) { $filterlist_sql = "select distinct c.categories_id as id, cd.categories_name as name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where p.products_status = '1' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and p2c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' and p.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "' order by cd.categories_name"; } else { $filterlist_sql= "select distinct m.manufacturers_id as id, m.manufacturers_name as name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_MANUFACTURERS . " m where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and p.products_id = p2c.products_id and p2c.categories_id = '" . (int)$current_category_id . "' order by m.manufacturers_name"; } $filterlist_query = tep_db_query($filterlist_sql); if (tep_db_num_rows($filterlist_query) > 1) { echo ' <td align="center" class="main">' . tep_draw_form('filter', FILENAME_DEFAULT, 'get') . TEXT_SHOW . ' '; if (isset($HTTP_GET_VARS['manufacturers_id'])) { echo tep_draw_hidden_field('manufacturers_id', $HTTP_GET_VARS['manufacturers_id']); $options = array(array('id' => '', 'text' => TEXT_ALL_CATEGORIES)); } else { echo tep_draw_hidden_field('cPath', $cPath); $options = array(array('id' => '', 'text' => TEXT_ALL_MANUFACTURERS)); } echo tep_draw_hidden_field('sort', $HTTP_GET_VARS['sort']); while ($filterlist = tep_db_fetch_array($filterlist_query)) { $options[] = array('id' => $filterlist['id'], 'text' => $filterlist['name']); } echo tep_draw_pull_down_menu('filter_id', $options, (isset($HTTP_GET_VARS['filter_id']) ? $HTTP_GET_VARS['filter_id'] : ''), 'onchange="this.form.submit()"'); echo '</form></td>' . "\n"; } } // Get the right image for the top-right $image = DIR_WS_IMAGES . 'table_background_list.gif'; if (isset($HTTP_GET_VARS['manufacturers_id'])) { $image = tep_db_query("select manufacturers_image from " . TABLE_MANUFACTURERS . " where manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'"); $image = tep_db_fetch_array($image); $image = $image['manufacturers_image']; } elseif ($current_category_id) { $image = tep_db_query("select categories_image from " . TABLE_CATEGORIES . " where categories_id = '" . (int)$current_category_id . "'"); $image = tep_db_fetch_array($image); $image = $image['categories_image']; } ?> <td align="right"><?php echo tep_image(DIR_WS_IMAGES . $image, HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td><?php include(DIR_WS_MODULES . FILENAME_PRODUCT_LISTING); ?></td> </tr> </table></td> <?php } else { // default page ?> <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> <td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_default.gif', HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="main"><?php echo tep_customer_greeting(); ?></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td class="main"><?php echo TEXT_MAIN; ?></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td><?php include(DIR_WS_MODULES . FILENAME_NEW_PRODUCTS); ?></td> </tr> <?php include(DIR_WS_MODULES . FILENAME_UPCOMING_PRODUCTS); ?> </table></td> </tr> </table></td> <?php } ?> <!-- 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 //--> <br> </body> </html> <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>
jonquil Posted February 15, 2007 Posted February 15, 2007 Welcome home :) Please post your includs/header.php file. jon It's all just ones and zeros....
Guest Posted February 18, 2007 Posted February 18, 2007 Jon Back from Ski -Austria. Not as much snow as previous visits...........I think global warming is having an effect. Thanks for your help. I have managed to remove the stray). If I wanted to re-position the "Welcome guest...etc " on the home page so the the end on the page any hints on how best to do this, and what files need editing. Best regards Peter
Guest Posted February 19, 2007 Posted February 19, 2007 You rat :( jon Now back Snow not as good as previous years. Perhaps global warming is a reality. I have managed to sort out the lost ) speak again soon Peter
Recommended Posts
Archived
This topic is now archived and is closed to further replies.