VirtueMart Forum

VirtueMart 2 + 3 => Virtuemart Development and bug reports => Topic started by: welrachid on July 20, 2015, 11:33:06 am

Title: Request for changing the search-able fields in orderlist view
Post by: welrachid on July 20, 2015, 11:33:06 am
Hi

Will it ever be possible to choose which columns to search in when using the FILTER input field in the top of the orders.php backend page

Specifically i want to be able to search for virtuemart_order_id and i dont like making "hacks" to core functionality

The change can be made here:
administrator/components/com_virtuemart/models/orders.php line 338-347

Code: [Select]
$searchFields = array();
$searchFields[] = 'u.first_name';
$searchFields[] = 'u.middle_name';
$searchFields[] = 'u.last_name';
$searchFields[] = 'o.order_number';
$searchFields[] = 'u.company';
$searchFields[] = 'u.email';
$searchFields[] = 'u.phone_1';
$searchFields[] = 'u.address_1';
$searchFields[] = 'u.zip';

Changed to

Code: [Select]
$searchFields = array();
$searchFields[] = 'u.first_name';
$searchFields[] = 'u.middle_name';
$searchFields[] = 'u.last_name';
$searchFields[] = 'o.order_number';
$searchFields[] = 'o.virtuemart_order_id';
$searchFields[] = 'u.company';
$searchFields[] = 'u.email';
$searchFields[] = 'u.phone_1';
$searchFields[] = 'u.address_1';
$searchFields[] = 'u.zip';

I've looked into the code and i dont see how to override this functionality. If you have any hints its highly appreciated.

Thanks.