carbonfiberdiy Posted November 21, 2012 Share Posted November 21, 2012 (edited) This is my template_top.php file. I don't think i've ever modified this. The problem only occurred after I installed the modular addon. Everything functioned fine before. It seems like the only file modified by the addon was the index.php... <?php /* $Id$ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2010 osCommerce Released under the GNU General Public License */ $oscTemplate->buildBlocks(); if (!$oscTemplate->hasBlocks('boxes_column_left')) { $oscTemplate->setGridContentWidth($oscTemplate->getGridContentWidth() + $oscTemplate->getGridColumnWidth()); } if (!$oscTemplate->hasBlocks('boxes_column_right')) { $oscTemplate->setGridContentWidth($oscTemplate->getGridContentWidth() + $oscTemplate->getGridColumnWidth()); } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" <?php echo HTML_PARAMS; ?>> <head> <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>" /> <meta name="Description" content="Looking for a swarovski jewellery sale? Jewellery Talks offers quality lapel pins, shamballa jewellery, and swarovski jewellry at affordable prices!" /> <meta name="Keywords" content="lapel pins, swarovski jewellery, shamballa jewellery, swarovski jewellery sale, Jewellery Talks" /> <title>Swarovski Jewellery Sale | Lapel Pins | Jewellery Talks</title> <meta name="DC.title" content="Swarovski Jewellery Sale | Lapel Pins | Jewellery Talks" /> <meta name="geo.region" content="GB" /> <meta name="geo.position" content="55.378051;-3.435973" /> <meta name="ICBM" content="55.378051, -3.435973" /> <meta name="robots" content="index,follow" /> <meta name="GOOGLEBOT" content="INDEX, FOLLOW" /> <meta name="language" content="English"> <link rel="canonical" href="http://jewellerytalks.co.uk/" /> <html lang="en-UK"> <base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>" /> <link rel="stylesheet" type="text/css" href="ext/jquery/ui/redmond/jquery-ui-1.8.6-osc.css" /> <script type="text/javascript" src="ext/jquery/jquery-1.4.2.min.js"></script> <script type="text/javascript" src="ext/jquery/ui/jquery-ui-1.8.6.min.js"></script> <?php if (tep_not_null(JQUERY_DATEPICKER_I18N_CODE)) { ?> <script type="text/javascript" src="ext/jquery/ui/i18n/jquery.ui.datepicker-<?php echo JQUERY_DATEPICKER_I18N_CODE; ?>.js"></script> <script type="text/javascript"> $.datepicker.setDefaults($.datepicker.regional['<?php echo JQUERY_DATEPICKER_I18N_CODE; ?>']); </script> <?php } ?> <script type="text/javascript" src="ext/jquery/bxGallery/jquery.bxGallery.1.1.min.js"></script> <link rel="stylesheet" type="text/css" href="ext/jquery/fancybox/jquery.fancybox-1.3.4.css" /> <script type="text/javascript" src="ext/jquery/fancybox/jquery.fancybox-1.3.4.pack.js"></script> <script type="text/javascript" src="ext/jquery/jquery.equalheights.js"></script> <script type="text/javascript" src="ext/jquery/jquery.corner.js"></script> <script type="text/javascript" src="ext/js/coin-slider.js"></script> <link rel="stylesheet" type="text/css" href="ext/960gs/<?php echo ((stripos(HTML_PARAMS, 'dir="rtl"') !== false) ? 'rtl_' : ''); ?>960_24_col.css" /> <link rel="stylesheet" type="text/css" href="css/stylesheet.css" /> <link rel="stylesheet" type="text/css" href="css/constants.css" /> <link rel="stylesheet" type="text/css" href="css/style.css" /> <link rel="stylesheet" type="text/css" href="css/style_boxes.css"> <link rel="stylesheet" type="text/css" href="css/coin-slider-styles.css"> <link rel="stylesheet" type="text/css" href="css/css3.css"> <script type="text/javascript" src="ext/js/js.js"></script> <?php require('ext/js/ie6/ie6.php');?> <?php echo $oscTemplate->getBlocks('header_tags'); ?> </head> <body> <div class="bg_body row_1"> <div id="bodyWrapper" class="container_<?php echo $oscTemplate->getGridContainerWidth(); ?> ofh"> <?php require(DIR_WS_INCLUDES . 'header.php'); ?> </div> </div> <div class="bg_body row_2"> <div id="bodyWrapper" class="container_<?php echo $oscTemplate->getGridContainerWidth(); ?> ofh"> <?php require(DIR_WS_INCLUDES . 'menu.php'); ?> </div> </div> <?php require(DIR_WS_INCLUDES . 'slider.php');?> <div class="bg_body row_4"> <div class="wrapper-padd"> <div id="bodyWrapper" class="container_<?php echo $oscTemplate->getGridContainerWidth(); ?> ofh"> <div id="bodyContent" class="grid_<?php echo $oscTemplate->getGridContentWidth(); ?> <?php echo ($oscTemplate->hasBlocks('boxes_column_left') ? 'push_' . $oscTemplate->getGridColumnWidth() : ''); ?>"> Edited November 21, 2012 by carbonfiberdiy Quote Link to comment Share on other sites More sharing options...
carbonfiberdiy Posted November 21, 2012 Share Posted November 21, 2012 My error log also shows these messages, i'm not sure if they are relevant... [Tue Nov 20 20:58:10 2012] [error] [client 72.92.21.228] client denied by server configuration: /home/uihus/public_html/jewellerytalks.co.uk/images/parking-page.html, referer: http://jewellerytalks.co.uk/index.php?cPath=54 [Tue Nov 20 20:58:10 2012] [error] [client 72.92.21.228] client denied by server configuration: /home/uihus/public_html/jewellerytalks.co.uk/images/index.php, referer: http://jewellerytalks.co.uk/index.php?cPath=54 [Tue Nov 20 20:58:10 2012] [error] [client 72.92.21.228] client denied by server configuration: /home/uihus/public_html/jewellerytalks.co.uk/images/index.html, referer: http://jewellerytalks.co.uk/index.php?cPath=54 Quote Link to comment Share on other sites More sharing options...
♥kymation Posted November 21, 2012 Author Share Posted November 21, 2012 <?php /* $Id$ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2010 osCommerce Released under the GNU General Public License */ $oscTemplate->buildBlocks(); if (!$oscTemplate->hasBlocks('boxes_column_left')) { $oscTemplate->setGridContentWidth($oscTemplate->getGridContentWidth() + $oscTemplate->getGridColumnWidth()); } if (!$oscTemplate->hasBlocks('boxes_column_right')) { $oscTemplate->setGridContentWidth($oscTemplate->getGridContentWidth() + $oscTemplate->getGridColumnWidth()); } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" <?php echo HTML_PARAMS; ?>> <head> <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>" /> <meta name="Description" content="Looking for a swarovski jewellery sale? Jewellery Talks offers quality lapel pins, shamballa jewellery, and swarovski jewellry at affordable prices!" /> <meta name="Keywords" content="lapel pins, swarovski jewellery, shamballa jewellery, swarovski jewellery sale, Jewellery Talks" /> <title>Swarovski Jewellery Sale | Lapel Pins | Jewellery Talks</title> <meta name="DC.title" content="Swarovski Jewellery Sale | Lapel Pins | Jewellery Talks" /> <meta name="geo.region" content="GB" /> <meta name="geo.position" content="55.378051;-3.435973" /> <meta name="ICBM" content="55.378051, -3.435973" /> <meta name="robots" content="index,follow" /> <meta name="GOOGLEBOT" content="INDEX, FOLLOW" /> <meta name="language" content="English"> <link rel="canonical" href="http://jewellerytalks.co.uk/" /> <html lang="en-UK"> <base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>" /> <link rel="stylesheet" type="text/css" href="ext/jquery/ui/redmond/jquery-ui-1.8.6-osc.css" /> <script type="text/javascript" src="ext/jquery/jquery-1.4.2.min.js"></script> <script type="text/javascript" src="ext/jquery/ui/jquery-ui-1.8.6.min.js"></script> <?php if (tep_not_null(JQUERY_DATEPICKER_I18N_CODE)) { ?> <script type="text/javascript" src="ext/jquery/ui/i18n/jquery.ui.datepicker-<?php echo JQUERY_DATEPICKER_I18N_CODE; ?>.js"></script> <script type="text/javascript"> $.datepicker.setDefaults($.datepicker.regional['<?php echo JQUERY_DATEPICKER_I18N_CODE; ?>']); </script> <?php } ?> <script type="text/javascript" src="ext/jquery/bxGallery/jquery.bxGallery.1.1.min.js"></script> <link rel="stylesheet" type="text/css" href="ext/jquery/fancybox/jquery.fancybox-1.3.4.css" /> <script type="text/javascript" src="ext/jquery/fancybox/jquery.fancybox-1.3.4.pack.js"></script> <script type="text/javascript" src="ext/jquery/jquery.equalheights.js"></script> <script type="text/javascript" src="ext/jquery/jquery.corner.js"></script> <script type="text/javascript" src="ext/js/coin-slider.js"></script> <link rel="stylesheet" type="text/css" href="ext/960gs/<?php echo ((stripos(HTML_PARAMS, 'dir="rtl"') !== false) ? 'rtl_' : ''); ?>960_24_col.css" /> <link rel="stylesheet" type="text/css" href="css/stylesheet.css" /> <link rel="stylesheet" type="text/css" href="css/constants.css" /> <link rel="stylesheet" type="text/css" href="css/style.css" /> <link rel="stylesheet" type="text/css" href="css/style_boxes.css"> <link rel="stylesheet" type="text/css" href="css/coin-slider-styles.css"> <link rel="stylesheet" type="text/css" href="css/css3.css"> <script type="text/javascript" src="ext/js/js.js"></script> <?php require('ext/js/ie6/ie6.php');?> <?php echo $oscTemplate->getBlocks('header_tags'); ?> </head> <body> <div class="bg_body row_1"> <div id="bodyWrapper" class="container_<?php echo $oscTemplate->getGridContainerWidth(); ?> ofh"> <?php require(DIR_WS_INCLUDES . 'header.php'); ?> </div> </div> <div class="bg_body row_2"> <div id="bodyWrapper" class="container_<?php echo $oscTemplate->getGridContainerWidth(); ?> ofh"> <?php require(DIR_WS_INCLUDES . 'menu.php'); ?> </div> </div> <?php require(DIR_WS_INCLUDES . 'slider.php');?> <div class="bg_body row_4"> <div class="wrapper-padd"> <div id="bodyWrapper" class="container_<?php echo $oscTemplate->getGridContainerWidth(); ?> ofh"> <div id="bodyContent" class="grid_<?php echo $oscTemplate->getGridContentWidth(); ?> <?php echo ($oscTemplate->hasBlocks('boxes_column_left') ? 'push_' . $oscTemplate->getGridColumnWidth() : ''); ?>"> That's very definitely not a stock file. Compare it to the file shipped with a fresh copy of osCommerce and you'll see the difference. The lines I've marked in red are duplicates. Get rid of the second one. Theerror messages you posted look like a hacking attempt. Nothing to do with your current problem. Regards Jim carbonfiberdiy 1 Quote See my profile for a list of my addons and ways to get support. Link to comment Share on other sites More sharing options...
carbonfiberdiy Posted November 21, 2012 Share Posted November 21, 2012 Thanks for your continued help. I deleted the second html line, however the problem still exists unfortunately. Any other suggestions? Where is the width defined for those categories? Quote Link to comment Share on other sites More sharing options...
♥kymation Posted November 21, 2012 Author Share Posted November 21, 2012 Then it's likely one of your added Javascript or CSS files. Try replacing your copy of template_top.php with one from the stock osCommerce package. If the problem goes away, you know where to start looking. Regards Jim carbonfiberdiy 1 Quote See my profile for a list of my addons and ways to get support. Link to comment Share on other sites More sharing options...
carbonfiberdiy Posted November 21, 2012 Share Posted November 21, 2012 Replacing the template_top.php with the stock file does nothing. Replacing the index.php file with the one I had previously before adding the module add-on fixes the problem. This leads me to assume there is a problem in the index.php file. Quote Link to comment Share on other sites More sharing options...
carbonfiberdiy Posted November 21, 2012 Share Posted November 21, 2012 (edited) First off, again I really appreciate your help, i'm a little bit out of my league in php. So replacing the the the index.php file with the one I had perviously corrected the issue with the subcategory display. So instead of using the index files that comes with the addon, I tried adding the modified code to my previous index.php. however the stock new products and banners still show. This is the code I need to add to the index file correct? // Start Modular Front Page ?> <div class="contentContainer"> <?php echo $oscTemplate->getBlocks('front_page'); ?> </div> <?php // End Modular Front Page This is my index file I was using before I used the replacement one provided in the addon, I tried sticking the code at the bottom, but it didn't get rid of the stock new products and banner module. Maybe you can direct me on where to add the addon code to my index file instead of using the one included, and hopefully that should correct my issue. <?php /* $Id$ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2010 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 . "'"); $categories_products = tep_db_fetch_array($categories_products_query); if ($categories_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); $tab_sel = tep_href_link(FILENAME_DEFAULT); ?> <?php require(DIR_WS_INCLUDES . 'template_top.php'); ?> <?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); ?> <?php echo tep_draw_content_top();?> <?php echo tep_draw_title_top();?> <h1><?php echo $category['categories_name']; ?></h1> <?php echo tep_draw_title_bottom();?> <div class="contentContainer page_un"> <?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) { $categories_row = $categories['total']; // 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; $col = 0; $row = 0; // $col_items = (MAX_DISPLAY_CATEGORIES_PER_ROW - 1); $prods_content = ' <div class="padding">'. "\n"; $prods_content .= ' <ul class="sub_categories">'. "\n"; while ($categories = tep_db_fetch_array($categories_query)) { $rows++; $cPath_new = tep_get_path($categories['categories_id']); $p_name = '<span><a href="' . tep_href_link(FILENAME_DEFAULT, $cPath_new) . '">' . $categories['categories_name'] . '</a></span>'; $p_pic = '<a class="prods_pic_bg" href="' . tep_href_link(FILENAME_DEFAULT, $cPath_new) . '" style="width:'.(SUBCATEGORY_IMAGE_WIDTH + 2).'px;height:'.(SUBCATEGORY_IMAGE_HEIGHT + 2).'px;">' . tep_image(DIR_WS_IMAGES . $categories['categories_image'], $categories['categories_name'], SUBCATEGORY_IMAGE_WIDTH, SUBCATEGORY_IMAGE_HEIGHT) . ''; // $width = (int)(100 / $categories_row) . '%'; // if ((($rows / MAX_DISPLAY_CATEGORIES_PER_ROW) == floor($rows / MAX_DISPLAY_CATEGORIES_PER_ROW)) && ($rows != $number_of_categories)) { // $colspan = ((MAX_DISPLAY_CATEGORIES_PER_ROW * 2) - 1) ; // if (($col === 0) && ($row != 0)) { $prods_content .= ''. "\n"; // hor separator start // } // if ($col === 0) { // $prods_content .= ' <ul class="sub_categories">'. "\n"; // }else { // $prods_content .= ''; // vert separator start // } $prods_content .= ' <li class="prods_content" style="width:'.(SUBCATEGORY_IMAGE_WIDTH + 2).'px;">'. "\n". ' <div class="pic_padd wrapper_pic_div" style="width:'.(SUBCATEGORY_IMAGE_WIDTH + 2).'px;height:'.(SUBCATEGORY_IMAGE_HEIGHT + 2).'px;">'.$p_pic.''.tep_draw_prod_pic3_top().''.tep_draw_prod_pic3_bottom().'</a></div>'. "\n". ' <div class="name name_padd">'.$p_name.'</div>'. "\n". ' </li>'. "\n"; // $col ++; // if ($col > $col_items) { // $prods_content .= ''. "\n"; // hor separator start // $row ++; // $col = 0; // }else{ // $prods_content .= ''. "\n"; // vert separator end // } // } } $prods_content .= ' </ul>'. "\n"; $prods_content .= '</div>'; // needed for the new products module shown below $new_products_category_id = $current_category_id; ?> <div class="contentPadd un"> <?php echo $prods_content; ?> </div> <?php include(DIR_WS_MODULES . 'new_products.php'); ?> </div><?php echo tep_draw_content_bottom();?> <?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'])) || (!preg_match('/^[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); switch ($column_list[$sort_col-1]) { case 'PRODUCT_LIST_MODEL': $listing_sql .= " order by p.products_model " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name"; break; case 'PRODUCT_LIST_NAME': $listing_sql .= " order by pd.products_name " . ($sort_order == 'd' ? 'desc' : ''); break; case 'PRODUCT_LIST_MANUFACTURER': $listing_sql .= " order by m.manufacturers_name " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name"; break; case 'PRODUCT_LIST_QUANTITY': $listing_sql .= " order by p.products_quantity " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name"; break; case 'PRODUCT_LIST_IMAGE': $listing_sql .= " order by pd.products_name"; break; case 'PRODUCT_LIST_WEIGHT': $listing_sql .= " order by p.products_weight " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name"; break; case 'PRODUCT_LIST_PRICE': $listing_sql .= " order by final_price " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name"; break; } } $catname = HEADING_TITLE; if (isset($HTTP_GET_VARS['manufacturers_id'])) { $image = tep_db_query("select manufacturers_image, manufacturers_name as catname from " . TABLE_MANUFACTURERS . " where manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'"); $image = tep_db_fetch_array($image); $catname = $image['catname']; } elseif ($current_category_id) { $image = tep_db_query("select c.categories_image, cd.categories_name as catname from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.categories_id = '" . (int)$current_category_id . "' and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "'"); $image = tep_db_fetch_array($image); $catname = $image['catname']; } ?> <?php echo tep_draw_content_top();?> <?php echo tep_draw_title_top();?> <h1><?php echo $catname; ?></h1> <?php echo tep_draw_title_bottom();?> <?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 tep_draw_form('filter', FILENAME_DEFAULT, 'get') . '<p class="show">' . 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()" class="select"'); echo tep_hide_session_id() . '</p></form>' . "\n"; // echo '<div class="prods_hseparator">'.tep_draw_separator('spacer.gif', '1', '1').'</div>'; } } include(DIR_WS_MODULES . FILENAME_PRODUCT_LISTING); ?> <?php echo tep_draw_content_bottom();?> <?php } else { // default page $first_page = true; ?> <?php echo tep_draw_content_top();?> <div class="none"> <?php echo tep_draw_title_top();?> <h1><?php echo HEADING_TITLE; ?></h1> <?php echo tep_draw_title_bottom();?> </div > <div class="contentContainer page_un"> <div class="contentText none"> <?php echo tep_customer_greeting(); ?> </div> <?php if (tep_not_null(TEXT_MAIN)) { ?> <div class="contentText"> <?php echo TEXT_MAIN; ?> </div> <?php } ?> <?php include(DIR_WS_MODULES . FILENAME_NEW_PRODUCTS); include(DIR_WS_MODULES . FILENAME_UPCOMING_PRODUCTS); ?> </div> <?php echo tep_draw_content_bottom();?> <?php } require(DIR_WS_INCLUDES . 'template_bottom.php'); require(DIR_WS_INCLUDES . 'application_bottom.php'); ?> Edited November 21, 2012 by carbonfiberdiy Quote Link to comment Share on other sites More sharing options...
♥kymation Posted November 21, 2012 Author Share Posted November 21, 2012 Replacing the index.php with the original will just disable the entire Addon. You can edit your version of that file, but the result will be the same. Check that you have uploaded all of the files to ext/modules/front_page/. Also check your settings in your Admin for the Categories Images module. If you have that module set to display in rows, that is what you will get. Regards Jim Quote See my profile for a list of my addons and ways to get support. Link to comment Share on other sites More sharing options...
ndiggity Posted November 24, 2012 Share Posted November 24, 2012 First off I'd like to thank you for programming this addon. It is really easy to install and use yet is very useful. Thank you! I'm having a little trouble with certain modules and think it has something to do with the Simply Hide Products addon I previously installed (http://www.oscommerce.com/forums/topic/349008-simply-hide-products-shp/ and http://addons.oscommerce.com/info/7117/v,22). Any of the modules that have to do with categories or products give me the error... 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'where c.categories_id not in(29)' at line 13 select c.categories_id, c.categories_image, cd.categories_name from categories_description cd join categories c on c.categories_id = cd.categories_id where c.parent_id = '0' and cd.language_id = '1' order by c.sort_order where c.categories_id not in(29) I'm not a php programmer so I can't figure out exactly what the problem is. I'm guessing that the Simply Hide Products addon added code that checks to see if a category or product is hidden and this code is incompatible with some of the Modular Front page code. I can see in my database that the table associated with the hidden products contains data only for categories and products that are not visible by everyone. So, the code must assume that if there is no reference to a certain product in the hidden products table then it is visible to everyone but if there is even one reference to a certain product or category then it is only visible by the customers called out in the table. Is there any way of reconciling this? I'd really like to use both addons. Any help would be very appreciated. Thank you. Quote Link to comment Share on other sites More sharing options...
♥kymation Posted November 24, 2012 Author Share Posted November 24, 2012 This is a problem with the Simply Hide Products addon. It's supposed to modify the SQL query to ignore one or more categories. I took a quick look at the code, and it looks like it should work. I would have to do more debugging to find out why it isn't, and I just don't have time for that right now. You might try posting in the support thread for that addon. Regards Jim Quote See my profile for a list of my addons and ways to get support. Link to comment Share on other sites More sharing options...
Guest Posted December 5, 2012 Share Posted December 5, 2012 Running OSC 2.3.1 Installed 'Front Page' add-on OK, and then 'Text Main' module. Created text in HTML and it shows fine on the page. However, the module won't let me edit it and to do this I have to uninstall and then re-install the module and put in the edited text. Any ideas please as to why this is happening. Thanks Martin Quote Link to comment Share on other sites More sharing options...
♥kymation Posted December 5, 2012 Author Share Posted December 5, 2012 Read this post. Regards Jim Quote See my profile for a list of my addons and ways to get support. Link to comment Share on other sites More sharing options...
Guest Posted December 6, 2012 Share Posted December 6, 2012 Thanks Jim Works fine now. Martin Quote Link to comment Share on other sites More sharing options...
REALGOODEAL Posted December 23, 2012 Share Posted December 23, 2012 This isn't a problem, so much as a question? I have installed the addon and it works perfectly! I ran into a few issues, but nothing serious; was able to fix them easily enough. Something I noticed after it was all set up was that the Upcoming Products module lost all of its style information from the div class ui widget. Personally, I really liked the way it looked (I have heavily modified my colors and images), and I set about trying to get the class back. Now, I'm no PHPer, so a lot of the fundamental details can go over my head easily, but I ended the PHP code to begin the div code and started the PHP back up after... blahblahblah... basically, it went through without errors, but it doesn't display the div class information around the Upcoming Products module... the header / heading strip just shoves itself to the top of the page, out of the way, not disturbing anything... but not doing what I want it to do. (Not a problem, I can undo the code to get rid of it.) So my question is, "Is it possible to keep the div class styling or adapt the code so that I may still use it?" Another question I have, should the resounding answer be no, is, "Is there a way to uninstall the Upcoming Products module from the front page and use osC's default module?" To clarify that last one... I wouldn't want to remove any of the coding in the module or addon, just add, merge, and/or adapt the original coding for the Upcoming Products feature ONLY. Theoretically, I should be able to uninstall the module in the admin section and alter the index.php code to add it after the addon code, right? (I have no idea, so...) Thanks for any input in advance. Let me know if you need a visual or any of my files. ~Jan Quote Link to comment Share on other sites More sharing options...
♥kymation Posted December 23, 2012 Author Share Posted December 23, 2012 Yes, you should be able to fix the Upcoming Products module to look the way you want. If I'm understanding you correctly, find this in catalog/includes/modules/front_page/upcoming_products.php: $upcoming_prods_content .= '<span style="float: right;">' . TABLE_HEADING_DATE_EXPECTED . '</span>' . PHP_EOL; $upcoming_prods_content .= ' <div class="contentText">' . PHP_EOL; and replace with this: $upcoming_prods_content .= ' <div class="ui-widget infoBoxContainer">' . PHP_EOL; $upcoming_prods_content .= ' <div class="ui-widget-header ui-corner-top infoBoxHeading">' . PHP_EOL; $upcoming_prods_content .= ' <span>' . TABLE_HEADING_UPCOMING_PRODUCTS . '</span>' . PHP_EOL; $upcoming_prods_content .= ' <span style="float: right;">' . TABLE_HEADING_DATE_EXPECTED . '</span>' . PHP_EOL; $upcoming_prods_content .= ' </div>' . PHP_EOL; $upcoming_prods_content .= ' <div class="ui-widget-content ui-corner-bottom">' . PHP_EOL; Then find this code: $upcoming_prods_content .= ' </table>' . PHP_EOL; $upcoming_prods_content .= ' </div>' . PHP_EOL; and add this line after it: $upcoming_prods_content .= ' </div>' . PHP_EOL; Let me know if this does what you want. Regards Jim Quote See my profile for a list of my addons and ways to get support. Link to comment Share on other sites More sharing options...
REALGOODEAL Posted December 24, 2012 Share Posted December 24, 2012 Yes, you should be able to fix the Upcoming Products module to look the way you want. If I'm understanding you correctly, find this in catalog/includes/modules/front_page/upcoming_products.php: $upcoming_prods_content .= '<span style="float: right;">' . TABLE_HEADING_DATE_EXPECTED . '</span>' . PHP_EOL; $upcoming_prods_content .= ' <div class="contentText">' . PHP_EOL; and replace with this: $upcoming_prods_content .= ' <div class="ui-widget infoBoxContainer">' . PHP_EOL; $upcoming_prods_content .= ' <div class="ui-widget-header ui-corner-top infoBoxHeading">' . PHP_EOL; $upcoming_prods_content .= ' <span>' . TABLE_HEADING_UPCOMING_PRODUCTS . '</span>' . PHP_EOL; $upcoming_prods_content .= ' <span style="float: right;">' . TABLE_HEADING_DATE_EXPECTED . '</span>' . PHP_EOL; $upcoming_prods_content .= ' </div>' . PHP_EOL; $upcoming_prods_content .= ' <div class="ui-widget-content ui-corner-bottom">' . PHP_EOL; Then find this code: $upcoming_prods_content .= ' </table>' . PHP_EOL; $upcoming_prods_content .= ' </div>' . PHP_EOL; and add this line after it: $upcoming_prods_content .= ' </div>' . PHP_EOL; Let me know if this does what you want. Regards Jim That totally did it! Thank you so much. :) Quote Link to comment Share on other sites More sharing options...
Guest Posted January 1, 2013 Share Posted January 1, 2013 Installed the module and it seemed to work but conflicted with some other add-ons I had installed. I restored my site from an admin.zip file from two days prior that I made. No all of the category and side boxes have disappeared. Any help would be greatly appreciated. My site is www.opticsandmore.com and I am running v2.3.3. Quote Link to comment Share on other sites More sharing options...
♥kymation Posted January 1, 2013 Author Share Posted January 1, 2013 You need to restore the database or uninstall all of the Front Page modules. Then you can replace the index.php with your backup version. That's all you need to do. Just out of curiosity: What did you have installed that conflicted? Regards Jim Quote See my profile for a list of my addons and ways to get support. Link to comment Share on other sites More sharing options...
♥geoffreywalton Posted January 1, 2013 Share Posted January 1, 2013 Installed the module and it seemed to work but conflicted with some other add-ons I had installed. I restored my site from an admin.zip file from two days prior that I made. No all of the category and side boxes have disappeared. Any help would be greatly appreciated. My site is www.opticsandmore.com and I am running v2.3.3. Turns out not to have been the changes in index.php but /includes/classes/osc_template.php Cheers G Quote Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile Virus Threat Scanner My Contributions Basic install answers. Click here for Contributions / Add Ons. UK your site. Site Move. Basic design info. For links mentioned in old answers that are no longer here follow this link Useful Threads. If this post was useful, click the Like This button over there ======>>>>>. Link to comment Share on other sites More sharing options...
♥kymation Posted January 1, 2013 Author Share Posted January 1, 2013 Modular Front Page doesn't make any changes to /includes/classes/osc_template.php. Was this some other addon? Regards Jim Quote See my profile for a list of my addons and ways to get support. Link to comment Share on other sites More sharing options...
♥geoffreywalton Posted January 1, 2013 Share Posted January 1, 2013 Must have been, MFP only changes index.php, which is why I said "Turns out not to have been the changes in index.php but /includes/classes/osc_template.php" I only got it back working, someone else made the "changes". Cheers G Quote Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile Virus Threat Scanner My Contributions Basic install answers. Click here for Contributions / Add Ons. UK your site. Site Move. Basic design info. For links mentioned in old answers that are no longer here follow this link Useful Threads. If this post was useful, click the Like This button over there ======>>>>>. Link to comment Share on other sites More sharing options...
gasan Posted January 10, 2013 Share Posted January 10, 2013 (edited) Hi. I'm running 2.3.3. but seems not to work. Changes needed? Edited January 10, 2013 by gasan Quote Link to comment Share on other sites More sharing options...
♥kymation Posted January 10, 2013 Author Share Posted January 10, 2013 I can't read your mind. Try giving some information about the problem. Regards Jim Quote See my profile for a list of my addons and ways to get support. Link to comment Share on other sites More sharing options...
♥14steve14 Posted January 10, 2013 Share Posted January 10, 2013 Jim is your chrystal ball broken now, that will make things hard for you. Quote REMEMBER BACKUP, BACKUP AND BACKUP Link to comment Share on other sites More sharing options...
♥kymation Posted January 10, 2013 Author Share Posted January 10, 2013 Yeah, it keeps saying "Try again later". I think I need to take it in for a tuneup. Regards Jim Quote See my profile for a list of my addons and ways to get support. Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.