I have quite a lot of option values under one of my options, maybe 50 or so.
In the admin these seem to display in no particular order (possibly the order they were entered in). I would like to sort these in the admin by using the sort order value for each option value. The front end does sort like this. I've been through the sql code in the model admin/model/catalog/option.php but it looks like it looks like its working in the way I want - I could be looking at the wrong code of course.
Code: Select all
public function getOptionValues($option_id) {
$option_value_data = array();
$option_value_query = $this->db->query("SELECT * FROM " . DB_PREFIX . "option_value ov LEFT JOIN " . DB_PREFIX . "option_value_description ovd ON (ov.option_value_id = ovd.option_value_id) WHERE ov.option_id = '" . (int)$option_id . "' AND ovd.language_id = '" . (int)$this->config->get('config_language_id') . "' ORDER BY ov.sort_order ASC");
Rob
screenshot attached - I should add that further downthe list are option values with a sort order of 42,43 etc