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)
-   -   Trying to modify customer search in 4.0.1 (https://forum.x-cart.com/showthread.php?t=8686)

longhorn180 07-30-2004 08:58 AM

Trying to modify customer search in 4.0.1
 
I installed 4.0(upgraded to 4.0.1) and have customized the search features on the customer's advanced search page somewhat. Instead of searching by short description and full descrition, i changed them to author and isbn and edited the search.php to reflect the changes. This works fine with 1 exception, if a customer wants to search by author they have to enter the name the way it is input into the database(last name, first name) or enter just the last name only. I would like them to be able to enter the author's first then last name, ex: Stephen King, and have the results displayed as well. I'm unsure of the correct way to do this and any help would be greatly appreciated. I believe this is the code I need to edit.

Code:

# Search for substring in some fields...
               
                if (!empty($data["by_title"]))
                        $condition[] = "$sql_tbl[products].product LIKE '%".$data["substring"]."%'";
               
                if (!empty($data["by_Author"]))
                        $condition[] = "$sql_tbl[products].Author LIKE '%".$data["substring"]."%'";

                if (!empty($data["by_isbn"]))
                        $condition[] = "$sql_tbl[products].isbn LIKE '%".$data["substring"]."%'";




Version 4.0.1

longhorn180 08-01-2004 09:32 AM

Something else in 4.0.1 I'd like to do, but don't know how. When a customer searches for something, and no matches are found, it kicks them to the advanced search page, but does'nt tell them that no matches were found. I'd like to add a line to the top of the page saying:
Sorry we found no matching results. How would I go about getting this label to display when no matches are found?

longhorn180 08-04-2004 06:54 PM

Is there anyone who might be able to help me? I'm sure it's a simple fix, but I'm having a hard time figuring it out.

snorocket 08-04-2004 07:58 PM

mysql errors
 
i've had a bunch of mysql errors searching for various stuff so i think the search is a little buggy right now


All times are GMT -8. The time now is 01:47 PM.

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