ajax live search on top searching bar


Here is the solution for the searching display. We can modify the query by the getProductSearchQuery() function in SearchController, with changing 

->setSortOrder(new SortOrder('product', Tools::getProductsOrder('by'), Tools::getProductsOrder('way'))) 


->setSortOrder(new SortOrder('product', "date_add", "desc"))

With such method we can display the order ideally without changing the product settings.

While here are some potential issues:

1. It is modifying on core file which may not be good for future version.

2. It may also affect other functions that includes getProductSearchQuery().

3. Not sure the module from your end still affected or not.

p.s. The products list is generated by function getProductSearchVariables() in ProductListingFrontController.php