Assuming you're using the latest version of the quick orders module, you can make a couple edits to manage sorting:
Edit the /includes/classes/ajax/zcAjaxQuickOrder.php file ... around line 39 you'll see a section like the following. Add the lines in red, as shown:EDIT:Code:while (!$result->EOF) { $product_list_array[$result->fields['products_model']] = $result->fields['products_name']; $result->MoveNext(); } // sort specifically by the order listed in the $qo_model_array() in the config file: $temp_array = $product_list_array; $product_list_array = array(); foreach($qo_model_array as $key) { $product_list_array[$key] = $temp_array[$key]; } unset($temp_array); // Uncomment the next line to sort by products_model // ksort($product_list_array); // Uncomment the next line to sort by products_name // asort($product_list_array); // finally, build list of models for menu use if (is_array($product_list_array)) { $product_list_models = array_keys($product_list_array); } }
I've added a variation of this code to the downloadable plugin, so that all sorting can be controlled by a new setting $qo_model_sortorder in the qo_settings.php file.


Reply With Quote

