Author Topic: Request for changing the search-able fields in orderlist view  (Read 376 times)

welrachid

  • Jr. Member
  • **
  • Posts: 260
  • 3rd party plugin developer
  • Skype Name: wel.rachid
  • VirtueMart Version: Always LATEST stable
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.
Best regards,
Wel