Sort search results by select attribute

Permalink
My client wants to add a select attribute that sorts the properties by quality: Signature, Executive, Premium, Quality. I tried adding the attribute, but the view.php sorts the quality attributes alphabetically instead of by their list order.

I think the line of code that needs to be changed is in the view.php file under tony_real_estate/blocks/tony_real_estate_search/:

getTotalPages() > 1) && $controller->showSortBy){ $qStrParams = $_GET; unset($qStrParams['resortQStr']); unset($qStrParams['sortBy']); ?>


Is there a way to get the controller to search by the select order instead of string parameters?