Answer the question
In order to leave comments, you need to log in
How to sort goods in CMS Netcat?
Good day everyone.
Tell me how to sort the list of products in Netcat by quantity in reverse order?
$sort_dir = $nc_core->input->fetch_get('sortDesc')? 'DESC' : 'ASC';
$price_column = "Price";
$sorting_methods = array(
'' => array('query_order' => "`Vendor` $sort_dir, `Name` $sort_dir",
'title' => 'По алфавиту',
'query_select' => ''),
'price' => array('query_order' => "`__PriceRange` $sort_dir",
'title' => 'По цене',
'query_select' => "(IF(`Price` = 0 OR `$price_column` IS NULL," .
"(SELECT MIN(`$price_column`) FROM `Message$classID` AS pr WHERE pr.`Parent_Message_ID` = a.`Message_ID`), " .
"`Price`)) AS `__PriceRange`"),
);
Answer the question
In order to leave comments, you need to log in
if you contacted this miracle tsms, it's better to wave your left hand and say the magic word! Warehouse of a rake, sawed a template, wrote Rest separately, sewed Vue in the end, spat, wherever you dig mistakes, a miracle code written in from---s. Learn worthy cms.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question