montano Posted August 1, 2006 Share Posted August 1, 2006 I am stumped and doing a search is not helping because I don't know the correct terminology to search for the solution and the words I am using are so broad that too many topics display to find the answer. So here's my dilema: I installed a templatemonster template and on the category pages the SKU is in the product name spot and the product name is in the price spot. Here's my link: Gaston Studio Oddly, it appears correctly on the home and what's new pages. I need to know exactly which page drives this. I am assuming it's a snippet out of place and just needs a tweak. Regards, Montano Link to comment Share on other sites More sharing options...
kgt Posted August 1, 2006 Share Posted August 1, 2006 advanced_search_result.php normally uses the includes/modules/product_listing.php file to actually list the results. With a template, this could actually be using a different file though. If your category listings are correct, then it likely is using a different file, since category listings also use includes/modules/product_listing.php. Contributions Discount Coupon Codes Donations Link to comment Share on other sites More sharing options...
montano Posted August 2, 2006 Author Share Posted August 2, 2006 Here's my code for includes/modules/product_listing.php Do you see any glaring mistakes? These templates are not all they're cracked up to be. I'm finding bad code and mispelled words and bad links. Very frustrating when they are so expensive. >_< <?php /* $Id: product_listing.php,v 1.44 2003/06/09 22:49:59 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ $listing_split = new splitPageResults($listing_sql, MAX_DISPLAY_SEARCH_RESULTS, 'p.products_id'); if ( ($listing_split->number_of_rows > 0) && ( (PREV_NEXT_BAR_LOCATION == '1') || (PREV_NEXT_BAR_LOCATION == '3') ) ) { ?> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="smallText"><?php echo $listing_split->display_count(TEXT_DISPLAY_NUMBER_OF_PRODUCTS); ?></td> <td class="smallText" align="right"><?php echo TEXT_RESULT_PAGE . ' ' . $listing_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?></td> </tr> </table> <?php } $list_box_contents = array(); for ($col=0, $n=sizeof($column_list); $col<$n; $col++) { switch ($column_list[$col]) { case 'PRODUCT_LIST_MODEL': $lc_text = TABLE_HEADING_MODEL; $lc_align = ''; break; case 'PRODUCT_LIST_NAME': $lc_text = TABLE_HEADING_PRODUCTS; $lc_align = ''; break; case 'PRODUCT_LIST_MANUFACTURER': $lc_text = TABLE_HEADING_MANUFACTURER; $lc_align = ''; break; case 'PRODUCT_LIST_PRICE': $lc_text = TABLE_HEADING_PRICE; $lc_align = 'right'; break; case 'PRODUCT_LIST_QUANTITY': $lc_text = TABLE_HEADING_QUANTITY; $lc_align = 'right'; break; case 'PRODUCT_LIST_WEIGHT': $lc_text = TABLE_HEADING_WEIGHT; $lc_align = 'right'; break; case 'PRODUCT_LIST_IMAGE': $lc_text = TABLE_HEADING_IMAGE; $lc_align = 'center'; break; case 'PRODUCT_LIST_BUY_NOW': $lc_text = TABLE_HEADING_BUY_NOW; $lc_align = 'center'; break; } if ( ($column_list[$col] != 'PRODUCT_LIST_BUY_NOW') && ($column_list[$col] != 'PRODUCT_LIST_IMAGE') ) { $lc_text = tep_create_sort_heading($HTTP_GET_VARS['sort'], $col+1, $lc_text); } $list_box_contents[0][] = array('align' => $lc_align, 'params' => 'class="productListing-heading"', 'text' => ' ' . $lc_text . ' '); } if ($listing_split->number_of_rows > 0) { $rows = 0; $column = 0; echo ' <table cellspacing=0 cellpadding=0 width=488> <tr><td colspan=3> <table cellspacing=0 cellpadding=0 width=100%> <tr><td><img src=images/m37.gif width=8 height=47></td> <td width=100% class=ch11><span style="padding-left: 8px"></span><span class=ch12>Categories/ '.$breadcrumb->trail(' » ').'</span></td> <td><img src=images/m38.gif width=8 height=47></td></tr> </table> </td></tr> <tr><td height=4></td></tr> <tr> '; $listing_query = tep_db_query($listing_split->sql_query); while ($listing = tep_db_fetch_array($listing_query)) { $product_contents = array(); $rows++; if (($rows/2) == floor($rows/2)) { $list_box_contents[] = array('params' => 'class="productListing-even"'); } else { $list_box_contents[] = array('params' => 'class="productListing-odd"'); } $cur_row = sizeof($list_box_contents) - 1; for ($col=0, $n=sizeof($column_list); $col<$n; $col++) { $lc_align = ''; switch ($column_list[$col]) { case 'PRODUCT_LIST_MODEL': $lc_align = ''; $lc_text = ' ' . $listing['products_model'] . ' '; break; case 'PRODUCT_LIST_NAME': $lc_align = ''; if (isset($HTTP_GET_VARS['manufacturers_id'])) { $lc_text = '<a class="pr_name" href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id'] . '&products_id=' . $listing['products_id']) . '">' . substr($listing['products_name'],0 ,30) . '</a>'; } else { $lc_text = '<a class="pr_name" href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']) . '">' . substr($listing['products_name'],0 ,30) . '</a>'; } break; case 'PRODUCT_LIST_MANUFACTURER': $lc_align = ''; $lc_text = ' <a href="' . tep_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $listing['manufacturers_id']) . '">' . $listing['manufacturers_name'] . '</a> '; break; case 'PRODUCT_LIST_PRICE': $lc_align = 'right'; if (tep_not_null($listing['specials_new_products_price'])) { $lc_text = '<span class="pr_price"style="color:494949; font-size:11px" ><s>'. $currencies->display_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</s></span><br><span class=pr_price>' . $currencies->display_price($listing['specials_new_products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</span>'; } else { $lc_text = '<span class="pr_price">' . $currencies->display_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</span>'; } break; case 'PRODUCT_LIST_QUANTITY': $lc_align = 'right'; $lc_text = ' ' . $listing['products_quantity'] . ' '; break; case 'PRODUCT_LIST_WEIGHT': $lc_align = 'right'; $lc_text = ' ' . $listing['products_weight'] . ' '; break; case 'PRODUCT_LIST_IMAGE': $lc_align = 'center'; if (isset($HTTP_GET_VARS['manufacturers_id'])) { $lc_text = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id'] . '&products_id=' . $listing['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $listing['products_image'], $listing['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a>'; } else { $lc_text = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $listing['products_image'], $listing['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a>'; } break; case 'PRODUCT_LIST_BUY_NOW': $lc_align = 'center'; $lc_text = '<a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing['products_id']) . '">' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW) . '</a> '; break; } $list_box_contents[$cur_row][] = array('align' => $lc_align, 'params' => 'class="productListing-data"', 'text' => $lc_text); $product_contents[] = $lc_text; } $product_query = tep_db_query("select products_description from " . TABLE_PRODUCTS_DESCRIPTION . " where products_id = '" . (int)$listing['products_id'] . "' and language_id = '" . (int)$languages_id . "'"); $product = tep_db_fetch_array($product_query); $new_products['products_description'] = $product['products_description']; // get products category $categories_query = tep_db_query("select categories_id from " . TABLE_PRODUCTS_TO_CATEGORIES . " where products_id = '" . (int)$listing['products_id'] . "'"); if (tep_db_num_rows($categories_query) > 0) { $categories = tep_db_fetch_array($categories_query); $categories_query2 = tep_db_query("select categories_name from " . TABLE_CATEGORIES_DESCRIPTION . " where categories_id = '" . (int)$categories['categories_id'] . "'"); $categories2 = tep_db_fetch_array($categories_query2); $category_name = $categories2['categories_name']; } else { $category_name = ''; } echo ' <td width=242 valign=top> <table cellspacing=0 cellpadding=0> <tr><td><img src=images/m23.gif></td></tr> <tr><td class=ch5> <table cellspacing=0 cellpadding=0> <tr><td height=6></td></tr> <tr><td width=109 align=center valign=top>'.$product_contents[0].'</td> <td width=129 valign=top> <table cellspacing=0 cellpadding=0 width=120> <tr><td height=30>'.$product_contents[1].'</td></tr> <tr><td background=images/m24.gif height=1></td></tr> <tr><td height=55 valign=middle>'.preg_replace('/\s\S*$/i', '', substr($new_products['products_description'], 0, 55)).' ...</td></tr> <tr><td height=35 valign=middle><span class=ch6>price:</span> <span class=ch7>'.$product_contents[2].'</span></td></tr> <tr><td height=3></td></tr> </table> </td></tr> <tr><td height=36 bgcolor=#F2EFED colspan=2 style="padding-left: 96px; padding-top: 10px"><a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing['products_id']) . '">' . tep_image_button('button_in_cart.gif') . '</a><span style="padding-left: 4px"></span><a href="' . tep_href_link('product_info.php','products_id=' . $listing['products_id']) . '">' . tep_image_button('small_view.gif') . '</a></td></tr> </table> </td></tr> <tr><td><img src=images/m22.gif width=242 height=7></td></tr> </table> </td> '; $column ++; if ($column >= 2) { $rows ++; $column = 0; echo ' </tr> <tr><td height=4></td></tr> <tr> '; } else echo '<td width=4></td>'; } echo ' </tr> </table> '; //new productListingBox($list_box_contents); } else { $list_box_contents = array(); $list_box_contents[0] = array('params' => 'class="productListing-odd"'); $list_box_contents[0][] = array('params' => 'class="productListing-data"', 'text' => TEXT_NO_PRODUCTS); echo '<div class=PageHeading>Categories</div>'; new productListingBox($list_box_contents); } if ( ($listing_split->number_of_rows > 0) && ((PREV_NEXT_BAR_LOCATION == '2') || (PREV_NEXT_BAR_LOCATION == '3')) ) { ?> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr><td height=2></td></tr> <tr> <td class="smallText"><?php echo $listing_split->display_count(TEXT_DISPLAY_NUMBER_OF_PRODUCTS); ?></td> <td class="smallText" align="right"><?php echo TEXT_RESULT_PAGE . ' ' . $listing_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?></td> </tr> </table> <?php } ?> Thank you!! Montano Link to comment Share on other sites More sharing options...
kgt Posted August 3, 2006 Share Posted August 3, 2006 I don't see any glaring errors, but it has been modified. Post advanced_search_results.php as well. There might be an error in that one. Contributions Discount Coupon Codes Donations Link to comment Share on other sites More sharing options...
montano Posted August 3, 2006 Author Share Posted August 3, 2006 Thank you so much for looking at this. here's the advanced_search_results.php <?php /* $Id: advanced_search_result.php,v 1.72 2003/06/23 06:50:11 project3000 Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ require('includes/application_top.php'); require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_ADVANCED_SEARCH); $error = false; if ( (isset($HTTP_GET_VARS['keywords']) && empty($HTTP_GET_VARS['keywords'])) && (isset($HTTP_GET_VARS['dfrom']) && (empty($HTTP_GET_VARS['dfrom']) || ($HTTP_GET_VARS['dfrom'] == DOB_FORMAT_STRING))) && (isset($HTTP_GET_VARS['dto']) && (empty($HTTP_GET_VARS['dto']) || ($HTTP_GET_VARS['dto'] == DOB_FORMAT_STRING))) && (isset($HTTP_GET_VARS['pfrom']) && !is_numeric($HTTP_GET_VARS['pfrom'])) && (isset($HTTP_GET_VARS['pto']) && !is_numeric($HTTP_GET_VARS['pto'])) ) { $error = true; $messageStack->add_session('search', ERROR_AT_LEAST_ONE_INPUT); } else { $dfrom = ''; $dto = ''; $pfrom = ''; $pto = ''; $keywords = ''; if (isset($HTTP_GET_VARS['dfrom'])) { $dfrom = (($HTTP_GET_VARS['dfrom'] == DOB_FORMAT_STRING) ? '' : $HTTP_GET_VARS['dfrom']); } if (isset($HTTP_GET_VARS['dto'])) { $dto = (($HTTP_GET_VARS['dto'] == DOB_FORMAT_STRING) ? '' : $HTTP_GET_VARS['dto']); } if (isset($HTTP_GET_VARS['pfrom'])) { $pfrom = $HTTP_GET_VARS['pfrom']; } if (isset($HTTP_GET_VARS['pto'])) { $pto = $HTTP_GET_VARS['pto']; } if (isset($HTTP_GET_VARS['keywords'])) { $keywords = $HTTP_GET_VARS['keywords']; } $date_check_error = false; if (tep_not_null($dfrom)) { if (!tep_checkdate($dfrom, DOB_FORMAT_STRING, $dfrom_array)) { $error = true; $date_check_error = true; $messageStack->add_session('search', ERROR_INVALID_FROM_DATE); } } if (tep_not_null($dto)) { if (!tep_checkdate($dto, DOB_FORMAT_STRING, $dto_array)) { $error = true; $date_check_error = true; $messageStack->add_session('search', ERROR_INVALID_TO_DATE); } } if (($date_check_error == false) && tep_not_null($dfrom) && tep_not_null($dto)) { if (mktime(0, 0, 0, $dfrom_array[1], $dfrom_array[2], $dfrom_array[0]) > mktime(0, 0, 0, $dto_array[1], $dto_array[2], $dto_array[0])) { $error = true; $messageStack->add_session('search', ERROR_TO_DATE_LESS_THAN_FROM_DATE); } } $price_check_error = false; if (tep_not_null($pfrom)) { if (!settype($pfrom, 'double')) { $error = true; $price_check_error = true; $messageStack->add_session('search', ERROR_PRICE_FROM_MUST_BE_NUM); } } if (tep_not_null($pto)) { if (!settype($pto, 'double')) { $error = true; $price_check_error = true; $messageStack->add_session('search', ERROR_PRICE_TO_MUST_BE_NUM); } } if (($price_check_error == false) && is_float($pfrom) && is_float($pto)) { if ($pfrom >= $pto) { $error = true; $messageStack->add_session('search', ERROR_PRICE_TO_LESS_THAN_PRICE_FROM); } } if (tep_not_null($keywords)) { if (!tep_parse_search_string($keywords, $search_keywords)) { $error = true; $messageStack->add_session('search', ERROR_INVALID_KEYWORDS); } } } if (empty($dfrom) && empty($dto) && empty($pfrom) && empty($pto) && empty($keywords)) { $error = true; $messageStack->add_session('search', ERROR_AT_LEAST_ONE_INPUT); } if ($error == true) { tep_redirect(tep_href_link(FILENAME_ADVANCED_SEARCH, tep_get_all_get_params(), 'NONSSL', true, false)); } $breadcrumb->add(NAVBAR_TITLE_1, tep_href_link(FILENAME_ADVANCED_SEARCH)); $breadcrumb->add(NAVBAR_TITLE_2, tep_href_link(FILENAME_ADVANCED_SEARCH_RESULT, tep_get_all_get_params(), 'NONSSL', true, false)); ?> <!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; ?>"> <base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>"> <title><?php echo TITLE; ?></title> <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="0" cellpadding="0"> <tr> <!-- 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"><?php echo HEADING_TITLE_2; ?></td> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td> <?php // 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_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; } } $select_str = "select distinct " . $select_column_list . " m.manufacturers_id, p.products_id, pd.products_name, 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 "; if ( (DISPLAY_PRICE_WITH_TAX == 'true') && (tep_not_null($pfrom) || tep_not_null($pto)) ) { $select_str .= ", SUM(tr.tax_rate) as tax_rate "; } $from_str = "from " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m using(manufacturers_id), " . TABLE_PRODUCTS_DESCRIPTION . " pd left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_CATEGORIES . " c, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c"; if ( (DISPLAY_PRICE_WITH_TAX == 'true') && (tep_not_null($pfrom) || tep_not_null($pto)) ) { if (!tep_session_is_registered('customer_country_id')) { $customer_country_id = STORE_COUNTRY; $customer_zone_id = STORE_ZONE; } $from_str .= " left join " . TABLE_TAX_RATES . " tr on p.products_tax_class_id = tr.tax_class_id left join " . TABLE_ZONES_TO_GEO_ZONES . " gz on tr.tax_zone_id = gz.geo_zone_id and (gz.zone_country_id is null or gz.zone_country_id = '0' or gz.zone_country_id = '" . (int)$customer_country_id . "') and (gz.zone_id is null or gz.zone_id = '0' or gz.zone_id = '" . (int)$customer_zone_id . "')"; } $where_str = " where p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id "; if (isset($HTTP_GET_VARS['categories_id']) && tep_not_null($HTTP_GET_VARS['categories_id'])) { if (isset($HTTP_GET_VARS['inc_subcat']) && ($HTTP_GET_VARS['inc_subcat'] == '1')) { $subcategories_array = array(); tep_get_subcategories($subcategories_array, $HTTP_GET_VARS['categories_id']); $where_str .= " and p2c.products_id = p.products_id and p2c.products_id = pd.products_id and (p2c.categories_id = '" . (int)$HTTP_GET_VARS['categories_id'] . "'"; for ($i=0, $n=sizeof($subcategories_array); $i<$n; $i++ ) { $where_str .= " or p2c.categories_id = '" . (int)$subcategories_array[$i] . "'"; } $where_str .= ")"; } else { $where_str .= " and p2c.products_id = p.products_id and p2c.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$HTTP_GET_VARS['categories_id'] . "'"; } } if (isset($HTTP_GET_VARS['manufacturers_id']) && tep_not_null($HTTP_GET_VARS['manufacturers_id'])) { $where_str .= " and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'"; } if (isset($search_keywords) && (sizeof($search_keywords) > 0)) { $where_str .= " and ("; for ($i=0, $n=sizeof($search_keywords); $i<$n; $i++ ) { switch ($search_keywords[$i]) { case '(': case ')': case 'and': case 'or': $where_str .= " " . $search_keywords[$i] . " "; break; default: $keyword = tep_db_prepare_input($search_keywords[$i]); $where_str .= "(pd.products_name like '%" . tep_db_input($keyword) . "%' or p.products_model like '%" . tep_db_input($keyword) . "%' or m.manufacturers_name like '%" . tep_db_input($keyword) . "%'"; if (isset($HTTP_GET_VARS['search_in_description']) && ($HTTP_GET_VARS['search_in_description'] == '1')) $where_str .= " or pd.products_description like '%" . tep_db_input($keyword) . "%'"; $where_str .= ')'; break; } } $where_str .= " )"; } if (tep_not_null($dfrom)) { $where_str .= " and p.products_date_added >= '" . tep_date_raw($dfrom) . "'"; } if (tep_not_null($dto)) { $where_str .= " and p.products_date_added <= '" . tep_date_raw($dto) . "'"; } if (tep_not_null($pfrom)) { if ($currencies->is_set($currency)) { $rate = $currencies->get_value($currency); $pfrom = $pfrom / $rate; } } if (tep_not_null($pto)) { if (isset($rate)) { $pto = $pto / $rate; } } if (DISPLAY_PRICE_WITH_TAX == 'true') { if ($pfrom > 0) $where_str .= " and (IF(s.status, s.specials_new_products_price, p.products_price) * if(gz.geo_zone_id is null, 1, 1 + (tr.tax_rate / 100) ) >= " . (double)$pfrom . ")"; if ($pto > 0) $where_str .= " and (IF(s.status, s.specials_new_products_price, p.products_price) * if(gz.geo_zone_id is null, 1, 1 + (tr.tax_rate / 100) ) <= " . (double)$pto . ")"; } else { if ($pfrom > 0) $where_str .= " and (IF(s.status, s.specials_new_products_price, p.products_price) >= " . (double)$pfrom . ")"; if ($pto > 0) $where_str .= " and (IF(s.status, s.specials_new_products_price, p.products_price) <= " . (double)$pto . ")"; } if ( (DISPLAY_PRICE_WITH_TAX == 'true') && (tep_not_null($pfrom) || tep_not_null($pto)) ) { $where_str .= " group by p.products_id, tr.tax_priority"; } 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'; $order_str = ' order by pd.products_name'; break; } } } else { $sort_col = substr($HTTP_GET_VARS['sort'], 0 , 1); $sort_order = substr($HTTP_GET_VARS['sort'], 1); $order_str = ' order by '; switch ($column_list[$sort_col-1]) { case 'PRODUCT_LIST_MODEL': $order_str .= "p.products_model " . ($sort_order == 'd' ? "desc" : "") . ", pd.products_name"; break; case 'PRODUCT_LIST_NAME': $order_str .= "pd.products_name " . ($sort_order == 'd' ? "desc" : ""); break; case 'PRODUCT_LIST_MANUFACTURER': $order_str .= "m.manufacturers_name " . ($sort_order == 'd' ? "desc" : "") . ", pd.products_name"; break; case 'PRODUCT_LIST_QUANTITY': $order_str .= "p.products_quantity " . ($sort_order == 'd' ? "desc" : "") . ", pd.products_name"; break; case 'PRODUCT_LIST_IMAGE': $order_str .= "pd.products_name"; break; case 'PRODUCT_LIST_WEIGHT': $order_str .= "p.products_weight " . ($sort_order == 'd' ? "desc" : "") . ", pd.products_name"; break; case 'PRODUCT_LIST_PRICE': $order_str .= "final_price " . ($sort_order == 'd' ? "desc" : "") . ", pd.products_name"; break; } } $listing_sql = $select_str . $from_str . $where_str . $order_str; require(DIR_WS_MODULES . FILENAME_PRODUCT_LISTING); ?> </td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td class="main"><?php echo '<a href="' . tep_href_link(FILENAME_ADVANCED_SEARCH, tep_get_all_get_params(array('sort', 'page')), 'NONSSL', true, false) . '">' . tep_image_button('button_back.gif', IMAGE_BUTTON_BACK) . '</a>'; ?></td> </tr> </table></td> <!-- body_text_eof //--> </tr> </table> <!-- body_eof //--> <!-- footer //--> <?php require(DIR_WS_INCLUDES . 'footer.php'); ?> <!-- footer_eof //--> </body> </html> <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?> Link to comment Share on other sites More sharing options...
montano Posted August 4, 2006 Author Share Posted August 4, 2006 I determined that it's this file that's causing the issue. includes/modules/product_listing.php I uploaded the original (non-template) file and while it's not as pretty as the template file it's ordered correctly. I'm off to compare the files but if anyone who's better at this can see where the error is, I'd GREATLY appreciate it. Thanks Montano Link to comment Share on other sites More sharing options...
montano Posted August 6, 2006 Author Share Posted August 6, 2006 Sadly, I never got an answer here nor from Template Monster, so after paying $150 for a broken template, I'll think twice before ever doing another OSC installation. In case anyone ever has this problem in the future, I will post the solution. It was quite simple with a little trial and error and some luck. This was the offending code. <td width=129 valign=top> <table cellspacing=0 cellpadding=0 width=120> <tr><td height=30>[b]'.$product_contents[1].'[/b]</td></tr> <tr><td background=images/m24.gif height=1></td></tr> <tr><td height=55 valign=middle>'.preg_replace('/\s\S*$/i', '', substr($new_products['products_description'], 0, 55)).' ...</td></tr> <tr><td height=35 valign=middle><span class=ch6>price:</span> <span class=ch7>[b]'.$product_contents[2].[/b]'</span></td></tr> <tr><td height=3></td></tr> </table> I replaced the 1 with a 2 and a 3 with a 3 in this '.$product_contents[2].' Link to comment Share on other sites More sharing options...
Guest Posted August 6, 2006 Share Posted August 6, 2006 Sadly, I never got an answer here nor from Template Monster, so after paying $150 for a broken template, I'll think twice before ever doing another OSC installation. In case anyone ever has this problem in the future, I will post the solution. It was quite simple with a little trial and error and some luck. This was the offending code. <td width=129 valign=top> <table cellspacing=0 cellpadding=0 width=120> <tr><td height=30>[b]'.$product_contents[1].'[/b]</td></tr> <tr><td background=images/m24.gif height=1></td></tr> <tr><td height=55 valign=middle>'.preg_replace('/\s\S*$/i', '', substr($new_products['products_description'], 0, 55)).' ...</td></tr> <tr><td height=35 valign=middle><span class=ch6>price:</span> <span class=ch7>[b]'.$product_contents[2].[/b]'</span></td></tr> <tr><td height=3></td></tr> </table> I replaced the 1 with a 2 and a 3 with a 3 in this '.$product_contents[2].' Perhaps you are missing the point of the osc forum. People here volunteer their ideas and expertise. They don't owe you an answer. The best osc stores in terms of layout use original ideas/designs instead of some ready-broken template. You should search the forum for design related posts (tips and tricks) and the contributions modules. http://www.oscommerce.com/community/contributions/category,8 http://www.oscommerce.com/forums/index.php?showforum=14 http://www.oscommerce.com/forums/index.php?showforum=12 http://shops.oscommerce.com/ Link to comment Share on other sites More sharing options...
choosealogin Posted August 6, 2006 Share Posted August 6, 2006 Yes, I'll second what Mark said. Sadly, I never got an answer here nor from Template Monster, so after paying $150 for a broken template, I'll think twice before ever doing another OSC installation. In case anyone ever has this problem in the future, I will post the solution. It was quite simple with a little trial and error and some luck. This was the offending code. Please remember that it was your TM template that was/is broken, not osC. :huh: Link to comment Share on other sites More sharing options...
montano Posted August 6, 2006 Author Share Posted August 6, 2006 That's all well and good but it's ironic that saying the slightest negative thing finally got someone to reply to my post. Yet, when I needed help it was really quiet around here. Only kgt offered to even look at my files. Trust me, I participate on several CMS and other related forums and always offer help if I know the answer. If someone is struggling with the correct terminology, I'll do the search for them and offer the links. This board is very difficult to navigate and the search function doesn't work very well. The best luck I had was to Google the topic then find the osc related page that way. The searches done here often came up with an error message saying my search terms were too short when they were phrases. Like this one: "modify home page" or this Product name in price location Those are just two searches of many I did that came up with no results. Some searches come up with a ton of totally unrelated topics making it very difficult to find answers. All I am saying is that I paid 150.00 for a template and couldn't get any support from either Template Monster or the osc community. There was nothing positive in this experience that would motivate me do another one. I'm fully aware that no one here owes me help, it just would have been nice to receive. This is not intended to be a flame, but a statement of my experience. Link to comment Share on other sites More sharing options...
choosealogin Posted August 6, 2006 Share Posted August 6, 2006 You make some good points, and I don't take it as a flame, it's all good...no worries. I try to help...to a fault. It's a wonder I get my own work done. It's more fun trying to solve other people's problems. :) When I see T**p*a*e Mon*s*e* ...I run the other way. I am unfamilar with the code they write, and I've never had any success with it. So sorry I didn't want to help, but that was the only reason why. The comment I quoted in my last post just rubbed me the wrong way. To me, it's like saying "the coffee I had a t Burger Queen this morning was awful, I'll never eat at McD's again!". TM and osc are 2 different monsters, no pun intended. ;) Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.