KiLLaH Posted April 16, 2003 Share Posted April 16, 2003 Hi there, I was wondering if it was possible to search for a customer by phonenumber? If so which modifications will this need? Many thanks in advance. :) //Maz Link to comment Share on other sites More sharing options...
Ajeh Posted April 16, 2003 Share Posted April 16, 2003 Edit the /admin/customers.php and update this section of code: <?php $search = ''; // BOF: WebMakers.com Added: Include customers telephone number is search if ( ($HTTP_GET_VARS['search']) && (tep_not_null($HTTP_GET_VARS['search'])) ) { $keywords = tep_db_input(tep_db_prepare_input($HTTP_GET_VARS['search'])); $search = "where c.customers_lastname like '%" . $keywords . "%' or c.customers_firstname like '%" . $keywords . "%' or c.customers_email_address like '%" . $keywords . "%' or c.customers_telephone like '%" . $keywords . "'"; } $new_fields=', c.customers_telephone'; $customers_query_raw = "select c.customers_id, c.customers_lastname, c.customers_firstname, c.customers_email_address, a.entry_country_id" . $new_fields . " from " . TABLE_CUSTOMERS . " c left join " . TABLE_ADDRESS_BOOK . " a on c.customers_id = a.customers_id and c.customers_default_address_id = a.address_book_id " . $search . " order by c.customers_lastname, c.customers_firstname"; // EOF: WebMakers.com Added: Include customers telephone number is search You can now search for a full phone or partial phone number. :D Link to comment Share on other sites More sharing options...
Waza04 Posted April 16, 2003 Share Posted April 16, 2003 What about postcode??? Warren Link to comment Share on other sites More sharing options...
KiLLaH Posted April 16, 2003 Author Share Posted April 16, 2003 Thanks alot Linda! Works like a dream. :) //Maz Link to comment Share on other sites More sharing options...
Ajeh Posted April 17, 2003 Share Posted April 17, 2003 Warren ... can you follow the bouncing ball? 8) Just look at the changes I made ... compare them to the original ... and duplicate the next change you want ... :D Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.