X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   search.php problem (https://forum.x-cart.com/showthread.php?t=3444)

grizjr82 07-03-2003 11:50 AM

search.php problem
 
When I go to this link:

http://www.godwintool.com/store/xcart/customer/search.php

It displays all the products instead of showing me the advanced search page. Is this supposed to happen? Am I supposed to pass some variables through search.php to display the advanced search page?

I didn't make any modifications to search.php so I don't understand what is going wrong.

Here is search.php:

Code:

#
# $Id: search.php,v 1.26 2002/06/13 10:06:10 zorg Exp $
#

require "../smarty.php";
require "../config.php";
@include "./https.php";
require "./auth.php";
require "../include/categories.php";

#
# Permorfm SQL search query
#

$search_category = addslashes(array_pop(func_query_first("select category from categories where categoryid='$in_category'")));

$search_query = "(products.product like '%$substring%' or products.descr like '%$substring%') and categories.category like '$search_category%' and products.forsale='Y' group by products.productid";

$total_products_in_search = count(func_search_products($search_query, $user_account['membership']));

#
# Navigation code
#
$total_nav_pages = ceil($total_products_in_search/$products_per_page)+1;
require "../include/navigation.php";

$smarty->assign("products",func_search_products($search_query." limit $first_page, $products_per_page", $user_account['membership']));

$smarty->assign("navigation_script","search.php?substring=".urlencode($substring)."&in_category=$in_category");

$HTTP_GET_VARS["substring"] = stripslashes($HTTP_GET_VARS["substring"]);

$smarty->assign("main","search");
$smarty->display("customer/home.tpl");
?>


Any help would be appreicated. Thanks.

kpayne 07-03-2003 12:46 PM

You're running and oldish version of X-cart. That's why.

As of 3.2.x, search.php brings up the advanced search. In earlier versions, it was just like doing a blank search, effectively showing all of your products.

Hope this helps!

--Kurt


All times are GMT -8. The time now is 02:36 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.