Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Customer search - Phone


KiLLaH

Recommended Posts

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

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...