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

search.php which one to modify?

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 12-30-2002, 02:21 PM
 
tcatrainer tcatrainer is offline
 

Advanced Member
  
Join Date: Nov 2002
Location: LI, NY
Posts: 50
 

Default search.php which one to modify?

I was looking to modify the search sql to search for another field the partnumber

Quote:
$search_query = "(
$sql_tbl[products].productcode like '%$substring%'
or
$sql_tbl[products].product like '%$substring%'
or
$sql_tbl[products].descr like '%$substring%')

and
$sql_tbl[categories].category like '$search_category%'
and
$sql_tbl[products].forsale='Y' $price_condition ".$sort_by_price;

All I should really have to do is add:
Quote:
$sql_tbl[products].productcode like '%$substring%'
or
i changed it in <
xcart dir>/admin/search.php
xcart dir>/customer/search.php
xcart dir>/provider/search.php
but it seems to have no effect when you actually performa a search.
It appears it should be calling
http://www.aeroaccess.com/xcart/customer/search.php
Reply With Quote
  #2  
Old 12-30-2002, 02:50 PM
  B00MER's Avatar 
B00MER B00MER is offline
 

X-Guru
  
Join Date: Sep 2002
Location: Keller, TX (Cart-Lab.com)
Posts: 3,165
 

Default

Have you tried printing the entire query to the screen and copy/pasting it into phpMyAdmin to see what kind of results you get?
__________________
Cart-Lab - 100+ Social Bookmarks for X-Cart.
Reply With Quote
  #3  
Old 12-31-2002, 08:37 AM
 
tcatrainer tcatrainer is offline
 

Advanced Member
  
Join Date: Nov 2002
Location: LI, NY
Posts: 50
 

Default

how can I print to the screen?
Reply With Quote
  #4  
Old 01-07-2003, 06:46 AM
  B00MER's Avatar 
B00MER B00MER is offline
 

X-Guru
  
Join Date: Sep 2002
Location: Keller, TX (Cart-Lab.com)
Posts: 3,165
 

Default

$sql = (long query string)
print $sql;

basically rebuild the sql statement into a var and print the var to the screen.

hth.
__________________
Cart-Lab - 100+ Social Bookmarks for X-Cart.
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 01:33 AM.

   

 
X-Cart forums © 2001-2020