Major problem with sorting by price after an advance search takes place

Description

I had trouble sorting by price after an advanced search was made. Here is a simple fix for the situation. Open advanced_search_result.tpl.php and go to line 363 I believe. Within that case statement change...

case 'PRODUCT_LIST_PRICE':
$order_str .= "final_price " . ($sort_order == 'd' ? "desc" : "") . ", pd.products_name";
break;

to...

case 'PRODUCT_LIST_PRICE':
switch ($sort_order) {
case 'a':
$order_str .= "final_price" . ($sort_order == 'a' ? "" : "") . ", p.products_price ASC";
break;
case 'd':
$order_str .= "final_price" . ($sort_order == 'd' ? "" : "") . ", p.products_price DESC";
break;
}
break;

All I did was place a case statement within the PRODUCT_LIST_PRICE case and use ASC and DESC to sort by price rather than by name. This should fix things.

blackhawk

Environment

Operating System: Windows
Platform: XAMPP

Steps to reproduce

None

Assignee

Michael Sasek

Reporter

kensleyl

Labels

None

Severity

Major

Components

Fix versions

Affects versions

Priority

Configure