Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

search.php problem

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 07-03-2003, 11:50 AM
 
grizjr82 grizjr82 is offline
 

Newbie
  
Join Date: Dec 2002
Posts: 4
 

Default 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.
Reply With Quote
  #2  
Old 07-03-2003, 12:46 PM
  kpayne's Avatar 
kpayne kpayne is offline
 

X-Adept
  
Join Date: Dec 2002
Location: Firetanksoftware.com
Posts: 469
 

Default

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
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 07:30 AM.

   

 
X-Cart forums © 2001-2020