moneyorder Class Reference

Inherits InterfaceModule, and InterfaceAcaPayment.

List of all members.

Public Member Functions

Public Attributes


Detailed Description

Definition at line 12 of file moneyorder.php.


Constructor & Destructor Documentation

moneyorder::__construct (  ) 

texte supp dans email commande

Definition at line 16 of file moneyorder.php.

00016                                 {
00017     global $order;
00018 
00019     $this->code = 'moneyorder';
00020     $this->title = __('module payment moneyorder text title');
00021     $this->description = __('module payment moneyorder text description');
00022     $this->sort_order = (defined('MODULE_PAYMENT_MONEYORDER_SORT_ORDER')? MODULE_PAYMENT_MONEYORDER_SORT_ORDER : 0);
00023     $this->icon = (tep_not_null('MODULE_PAYMENT_MONEYORDER_ICON')? substr(MODULE_PAYMENT_MONEYORDER_ICON,strlen(DIR_WS_CATALOG))  : '');
00024     $this->enabled = true;
00025 
00026     if ((int)MODULE_PAYMENT_MONEYORDER_ORDER_STATUS_ID > 0)$this->order_status = MODULE_PAYMENT_MONEYORDER_ORDER_STATUS_ID;
00027 
00028     if (is_object($order)) $this->update_status();
00029 
00031     $this->email_footer = __('MODULE_PAYMENT_MONEYORDER_TEXT_EMAIL_FOOTER');
00032   }


Member Function Documentation

moneyorder::after_process (  ) 

Definition at line 72 of file moneyorder.php.

00072 { return false; }

moneyorder::before_process (  ) 

Definition at line 71 of file moneyorder.php.

00071 { return false; }

moneyorder::check (  ) 

Definition at line 86 of file moneyorder.php.

00086                           {
00087     $DB=Database::getInstance();
00088     if (!isset($this->_check)) {
00089       $check_query = $DB->query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key LIKE 'MODULE_PAYMENT_MONEYORDER%' ");
00090       if( $check_query->__get('numRows') ==  count($this->keys()) ) $this->_check=true;
00091       else {
00092         $this->remove();
00093         $this->_check=false;
00094       }
00095     }
00096     return $this->_check;
00097   }

moneyorder::confirmation (  ) 

Definition at line 66 of file moneyorder.php.

00066                                   {
00067     return array('title' => __('module payment moneyorder text title'));
00068   }

moneyorder::get_error (  ) 

Definition at line 84 of file moneyorder.php.

00084 { return false; }

moneyorder::install (  ) 

Definition at line 99 of file moneyorder.php.

00099                              {
00100     $DB=Database::getInstance();
00101     $DB->query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('".addslashes(__("Payable à..."))."', 'MODULE_PAYMENT_MONEYORDER_PAYTO', '', '".addslashes(__("A qu'elle ordre doit être effectue le paiement ?"))."', '6', '0', now());");
00102     $DB->query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('".addslashes(__("Ordre de tri"))."', 'MODULE_PAYMENT_MONEYORDER_SORT_ORDER', '0', '".addslashes(__("Ordre de tri pour l'affichage (Le plus petit nombre est montré en premier)."))."', '6', '1', now())");
00103     $DB->query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('Zone de paiement', 'MODULE_PAYMENT_MONEYORDER_ZONE', '0', '".addslashes(__("Permettre seulement cette méthode de paiement pour la zone choisie."))."', '6', '2', 'tep_get_zone_class_title', 'tep_cfg_pull_down_zone_classes(', now())");
00104     $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 ('".addslashes(__("Etat de la commande"))."', 'MODULE_PAYMENT_MONEYORDER_ORDER_STATUS_ID', '0', '".addslashes(__("Sélectionner l'état de la commande que vous voulez par défault."))."', '6', '1', 'tep_cfg_pull_down_order_statuses(', 'tep_get_order_status_name', now())");
00105 
00106     $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 ('".__('Icone pour ce mode paiement')."', 'MODULE_PAYMENT_MONEYORDER_ICON', '', '".addslashes(__("Choix d'un icone"))."', '6', '5', 'tep_cfg_choose_img(', NULL, now())");
00107   }

moneyorder::javascript_validation (  ) 

Definition at line 55 of file moneyorder.php.

00055 { return false; }

moneyorder::keys (  ) 

Definition at line 114 of file moneyorder.php.

Referenced by check(), and remove().

00114                           {
00115     return array( 'MODULE_PAYMENT_MONEYORDER_ZONE', 'MODULE_PAYMENT_MONEYORDER_ORDER_STATUS_ID', 'MODULE_PAYMENT_MONEYORDER_SORT_ORDER', 'MODULE_PAYMENT_MONEYORDER_PAYTO','MODULE_PAYMENT_MONEYORDER_ICON');
00116   }

moneyorder::payment_succes (  ) 

Retour des éléments de num order, de order de cheque, et des liens vers account.

Definition at line 77 of file moneyorder.php.

00077                                     {
00078     $s=__('note succes monyeyorder');
00079     if(tep_session_is_registered('the_order_formated'))  $s.=sprintf(__('link succes monyeyorder'),$_SESSION['the_order_formated']);
00080     elseif(tep_session_is_registered('the_order_id')) $s.=sprintf(__('link succes monyeyorder'),$_SESSION['the_order_id']);
00081     return $s;
00082   }

moneyorder::pre_confirmation_check (  ) 

Definition at line 64 of file moneyorder.php.

00064 { return false; }

moneyorder::process_button (  ) 

Definition at line 70 of file moneyorder.php.

00070 { return false; }

moneyorder::remove (  ) 

Definition at line 109 of file moneyorder.php.

00109                             {
00110     $DB=Database::getInstance();
00111     $DB->query("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')");
00112   }

moneyorder::selection (  ) 

Definition at line 57 of file moneyorder.php.

00057                                {
00058     return array( 'id' => $this->code,
00059                   'module' => $this->title,
00060                   'icon'=>tep_image($this->icon, $this->title)
00061                 );
00062   }

moneyorder::update_status (  ) 

Definition at line 35 of file moneyorder.php.

Referenced by __construct().

00035                                    {
00036   global $order;
00037 
00038     if ( ($this->enabled == true) && ((int)MODULE_PAYMENT_MONEYORDER_ZONE > 0) ) {
00039       $check_flag = false;
00040       $check_query = tep_db_query("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_PAYMENT_MONEYORDER_ZONE . "' and (zone_country_id = '" . $order->delivery['country']['id'] . "' OR zone_country_id ='0') order by zone_id");
00041       while ($check = tep_db_fetch_array($check_query)) {
00042         if ($check['zone_id'] < 1) {
00043             $check_flag = true;
00044             break;
00045         } elseif ($check['zone_id'] == $order->billing['zone_id']) {
00046             $check_flag = true;
00047             break;
00048         }
00049       }
00050 
00051       if ($check_flag == false)  $this->enabled = false;
00052     }
00053   }


Member Data Documentation

moneyorder::$code

Definition at line 13 of file moneyorder.php.

moneyorder::$description

Definition at line 13 of file moneyorder.php.

moneyorder::$enabled

Definition at line 13 of file moneyorder.php.

moneyorder::$title

Definition at line 13 of file moneyorder.php.


The documentation for this class was generated from the following file: