не помню как в этой версии, но в filterpro_v2.4.2.3.1(mega)
сортировка такая
if(isset($data['sort']) && array_key_exists($data['sort'], $sort_data)) {
$data['sort'] = $sort_data[$data['sort']];
if($data['sort'] == 'name' || $data['sort'] == 'model') {
$sql .= " ORDER BY LCASE(" . $data['sort'] . ")";
} else {
$sql .= " ORDER BY " . $data['sort'];
}
} else {
$sql .= " ORDER BY sort_order";
}
if(isset($data['order']) && ($data['order'] == 'DESC')) {
$sql .= " DESC, LCASE(name) DESC";
} else {
$sql .= " ASC, LCASE(name) ASC";
}
в ocstore последней версии
if (isset($data['sort']) && in_array($data['sort'], $sort_data)) {
if ($data['sort'] == 'pd.name' || $data['sort'] == 'p.model') {
$sql .= " ORDER BY LCASE(" . $data['sort'] . ")";
} elseif ($data['sort'] == 'p.price') {
$sql .= " ORDER BY (CASE WHEN special IS NOT NULL THEN special WHEN discount IS NOT NULL THEN discount ELSE p.price END)";
} else {
$sql .= " ORDER BY " . $data['sort'];
}
} else {
$sql .= " ORDER BY p.sort_order";
}
if (isset($data['order']) && ($data['order'] == 'DESC')) {
$sql .= " DESC, LCASE(pd.name) DESC";
} else {
$sql .= " ASC, LCASE(pd.name) ASC";
}