Guest Posted September 18, 2005 Posted September 18, 2005 :blink: When I do a search (quick or advanced, either way), the query is displaying in the results window, at the top, before the list of products that match the search criteria... Here's an example of the output, when I search for "test" : select distinct p.products_model, p.products_image, 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 from products p left join manufacturers m using(manufacturers_id), products_description pd left join specials s on p.products_id = s.products_id, categories c, products_to_categories p2c where p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '1' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and ((pd.products_name like '%test%' or p.products_model like '%test%' or m.manufacturers_name like '%test%') ) order by pd.products_name Displaying 1 to 6 (of 6 products) Result Pages: 1 then the product listings matching the criteria display below this..... I had a programmer make some changes, and he quit, leaving me without advising what file he edited, and what changes were made.... Please advise where I should look, to fix this, so the query is hidden.... I imagine it's somewhere in advanced_search.tpl.php, or english\advanced_search.php, or english\product_search.php, or content\product_search.tpl.php, or content\product_search_results.tpl.php but I have no clue where to look.... No hablo el scripto... so a point in the right direction would be much appreciated. :'( Thanks. RR
Guest Posted September 19, 2005 Posted September 19, 2005 I hunted and found the file the guy edited... Here's the script.... Now... Can anyone see why am I getting the sql query displaying in the search results ??... and if so, can you advise how to fix it? He made no backup copy of the file, so other than installing a new version of osc somewhere and getting the original file to replace this one with, I'm stuck for a solution... Thanks. :blink: RR <?php /* $Id: product_search.php,v 1.1.1.1 08162005 0229 screwy_scripter Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Copyright (c) 2005 Screwey Scripter Released under the GNU General Public License */ require('includes/application_top.php'); require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_PRODUCT_SEARCH); $breadcrumb->add(NAVBAR_TITLE_1, tep_href_link(FILENAME_PRODUCT_SEARCH)); $content = CONTENT_PRODUCT_SEARCH; //$javascript = $content . '.js.php'; require(DIR_WS_TEMPLATES . TEMPLATE_NAME . '/' . TEMPLATENAME_MAIN_PAGE); require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>
Recommended Posts
Archived
This topic is now archived and is closed to further replies.