Skip to content
Snippets Groups Projects
Commit 7ef753dd authored by kevin.dezaphi's avatar kevin.dezaphi
Browse files

FEAT #8406 fix alt_identifier with order

parent ff112d3b
No related branches found
No related tags found
No related merge requests found
......@@ -154,10 +154,21 @@ if (!empty($order_field) && !empty($order)) {
$list->setOrder();
$list->setOrderField($arr_order[0]);
}
if ($_SESSION['current_basket']['basket_res_order'] == 'alt_identifier') {
$orderstr = 'order by order_alphanum(alt_identifier)'.' desc';
$basket_res_order = explode(' ', $_SESSION['current_basket']['basket_res_order']);
if ($basket_res_order[0] == 'alt_identifier') {
$orderstr = 'order by order_alphanum(alt_identifier)';
if (empty($basket_res_order[1])) {
$orderstr .= 'desc';
} else {
$orderstr .= $basket_res_order[1];
}
} else {
$orderstr = 'order by '.$_SESSION['current_basket']['basket_res_order'].' desc';
$orderstr = 'order by '.$_SESSION['current_basket']['basket_res_order'].' ';
if (empty($basket_res_order[1])) {
$orderstr .= 'desc';
} else {
$orderstr .= $basket_res_order[1];
}
}
$_SESSION['last_order_basket'] = $orderstr;
} else {
......
......@@ -154,10 +154,21 @@ if (!empty($order_field) && !empty($order)) {
$list->setOrder();
$list->setOrderField($arr_order[0]);
}
if ($_SESSION['current_basket']['basket_res_order'] == 'alt_identifier') {
$orderstr = 'order by order_alphanum(alt_identifier)';
$basket_res_order = explode(' ', $_SESSION['current_basket']['basket_res_order']);
if ($basket_res_order[0] == 'alt_identifier') {
$orderstr = 'order by order_alphanum(alt_identifier) ';
if (empty($basket_res_order[1])) {
$orderstr .= 'desc';
} else {
$orderstr .= $basket_res_order[1];
}
} else {
$orderstr = 'order by '.$_SESSION['current_basket']['basket_res_order'];
$orderstr = 'order by '.$_SESSION['current_basket']['basket_res_order'].' ';
if (empty($basket_res_order[1])) {
$orderstr .= 'desc';
} else {
$orderstr .= $basket_res_order[1];
}
}
$_SESSION['last_order_basket'] = $orderstr;
} else {
......
......@@ -153,10 +153,21 @@ if (!empty($order_field) && !empty($order)) {
$list->setOrder();
$list->setOrderField($arr_order[0]);
}
if ($_SESSION['current_basket']['basket_res_order'] == 'alt_identifier') {
$orderstr = 'order by order_alphanum(alt_identifier)'.' desc';
$basket_res_order = explode(' ', $_SESSION['current_basket']['basket_res_order']);
if ($basket_res_order[0] == 'alt_identifier') {
$orderstr = 'order by order_alphanum(alt_identifier) ';
if (empty($basket_res_order[1])) {
$orderstr .= 'desc';
} else {
$orderstr .= $basket_res_order[1];
}
} else {
$orderstr = 'order by '.$_SESSION['current_basket']['basket_res_order'].' desc';
$orderstr = 'order by '.$_SESSION['current_basket']['basket_res_order'].' ';
if (empty($basket_res_order[1])) {
$orderstr .= 'desc';
} else {
$orderstr .= $basket_res_order[1];
}
}
$_SESSION['last_order_basket'] = $orderstr;
} else {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment