/** * Install all configuration settings. * * @return bool */ function install() { if (!$this->is_installed()) { $config_fields = $this->get_config_fields(); foreach ($config_fields as $field_key => $field_data) { if (!isset($field_data['title'])) { $field_data['title'] = ''; } if (!isset($field_data['value'])) { $field_data['value'] = ''; } if (!isset($field_data['description'])) { $field_data['description'] = ''; } if (!isset($field_data['group_id'])) { $field_data['group_id'] = '6'; } if (!isset($field_data['sort_order'])) { $field_data['sort_order'] = '0'; } if (!isset($field_data['use_function'])) { $field_data['use_function'] = ''; } if (!isset($field_data['set_function'])) { $field_data['set_function'] = ''; } paywithamazon_config::create_config_field($field_key, $field_data['title'], $field_data['value'], $field_data['description'], $field_data['group_id'], $field_data['sort_order'], $field_data['use_function'], $field_data['set_function']); } $this->create_reference_table(); $this->create_refunds_reference_table(); $this->create_voids_reference_table(); $this->create_closes_reference_table(); $this->is_installed = true; } return $this->is_installed; }
/** * @return array */ public static function get_config() { $client_id = tep_db_fetch_array(paywithamazon_config::get_config_value_query('MODULE_HEADER_TAGS_LOGINWITHAMAZON_CLIENT_ID')); $client_id = $client_id['configuration_value']; return array('client_id' => $client_id); }