code = 'virementbancaire'; $this->title = MODULE_PAYMENT_VIREMENT_BANCAIRE_TEXT_TITLE; $this->description = MODULE_PAYMENT_VIREMENT_BANCAIRE_TEXT_DESCRIPTION2; $this->email_footer = MODULE_PAYMENT_VIREMENT_BANCAIRE_TEXT_EMAIL_FOOTER; $this->sort_order = MODULE_PAYMENT_VIREMENT_BANCAIRE_SORT_ORDER; $this->enabled = ((MODULE_PAYMENT_VIREMENT_BANCAIRE_STATUS == 'True') ? true : false); if ((int)MODULE_PAYMENT_VIREMENT_BANCAIRE_STATUS_ID > 0) { $this->order_status = MODULE_PAYMENT_VIREMENT_BANCAIRE_ORDER_STATUS_ID; } // -> VDFIX_VIREMENT $this->order_status = MODULE_PAYMENT_VIREMENT_BANCAIRE_ORDER_STATUS_ID; // <- VDFIX_VIREMENT if (is_object($order)) $this->update_status(); } // class methods function javascript_validation() { return false; } function selection() { $this->title_selection = '' . $this->title; return array('id' => $this->code, 'module' => $this->title_selection); } function pre_confirmation_check() { return false; } function confirmation() { return array('title' => MODULE_PAYMENT_VIREMENT_BANCAIRE_TEXT_DESCRIPTION); } function process_button() { return false; } function before_process() { return false; } function after_process() { return false; } function get_error() { return false; } function check() { if (!isset($this->check)) { $check_query = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_PAYMENT_VIREMENT_BANCAIRE_STATUS'"); $this->check = tep_db_num_rows($check_query); } return $this->check; } function install() { tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Permet le paiement par transfer bancaire', 'MODULE_PAYMENT_VIREMENT_BANCAIRE_STATUS', 'True', 'Voulez-vous accepter les ordre de virement bancaire?', '6', '1', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Numero IBAN', 'MODULE_PAYMENT_VIREMENT_BANCAIRE_IBAN', '0000-0000-0000-0000-0000-0000-000', 'Numero IBAN au format xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxx', '6', '1', now());"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Code Identification Bancaire BIC_SWIFT', 'MODULE_PAYMENT_VIREMENT_BANCAIRE_BIC', '00000000000', 'Numero BIC_SWIFT au format xxxxxxxxxxx', '6', '1', now());"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('ordre de tri', 'MODULE_PAYMENT_VIREMENT_BANCAIRE_SORT_ORDER', '0', 'ordre de tri pour l\'affichage (Le plus petit nombre est montrer en premier).', '6', '0', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('No. du compte bancaire', 'MODULE_PAYMENT_VIREMENT_BANCAIRE_ACCNUM', '00000-00000-00000000000-00', 'No de compte au format CodeBanque-CodeGuichet-NoDeCompte-Clef', '6', '1', now());"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, use_function, date_added) values ('Etat de la commande', 'MODULE_PAYMENT_VIREMENT_BANCAIRE_ORDER_STATUS_ID', '0', 'Sélectionner l\'état de la commande que vous voulez par défault.', '6', '0', 'tep_cfg_pull_down_order_statuses(', 'tep_get_order_status_name', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Titulaire du compte', 'MODULE_PAYMENT_VIREMENT_BANCAIRE_ACCNAM', 'Joe Lagrenouille', '', '6', '1', now());"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Nom et domiciliation de la Banque', 'MODULE_PAYMENT_VIREMENT_BANCAIRE_BANKNAM', 'la Banque', '', '6', '1', now());"); } function remove() { tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_PAYMENT_VIREMENT_BANCAIRE_STATUS'"); tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_PAYMENT_VIREMENT_BANCAIRE_IBAN'"); tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_PAYMENT_VIREMENT_BANCAIRE_BIC'"); tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_PAYMENT_VIREMENT_BANCAIRE_ACCNUM'"); tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_PAYMENT_VIREMENT_BANCAIRE_ACCNAM'"); tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_PAYMENT_VIREMENT_BANCAIRE_BANKNAM'"); } function keys() { $keys = array('MODULE_PAYMENT_VIREMENT_BANCAIRE_STATUS', 'MODULE_PAYMENT_VIREMENT_BANCAIRE_IBAN', 'MODULE_PAYMENT_VIREMENT_BANCAIRE_BIC', 'MODULE_PAYMENT_VIREMENT_BANCAIRE_ACCNUM', 'MODULE_PAYMENT_VIREMENT_BANCAIRE_ACCNAM', 'MODULE_PAYMENT_VIREMENT_BANCAIRE_BANKNAM', 'MODULE_PAYMENT_VIREMENT_BANCAIRE_ORDER_STATUS_ID', 'MODULE_PAYMENT_VIREMENT_BANCAIRE_SORT_ORDER'); return $keys; } } ?>