In the model, add a method (for example, in catalog / product, not the essence):
public function getAllOptions() { $option_value_description = array(); $option_value_query = $this->db->query("SELECT * FROM " . DB_PREFIX . "option_description WHERE language_id = '" . (int)$this->config->get('config_language_id') . "' ORDER BY option_id ASC"); foreach ($option_value_query ->rows as $option){ $option_value_description_query = $this->db->query("SELECT * FROM " . DB_PREFIX . "option_value_description WHERE option_id = " . $option['option_id'] . " AND language_id = '" . (int)$this->config->get('config_language_id') . "' ORDER BY option_value_id ASC"); $option_value_description[$option['name']] = $option_value_description_query->rows; } return $option_value_description; }
Somewhere in the controller, call the model method:
$this->load->model('catalog/category'); //подключение модели .... $all_options = $this->model_catalog_product->getAllOptions();
As a result, get an array of options:
Array( [опция1] => Array( [0] => Array ( [option_value_id] => ... [language_id] => ... [option_id] => ... [name] => ... ) [1] => ... [опция2] => Array( ... ....