ot_subtotal Class Reference

Inherits InterfaceModule, and InterfaceAcaOrderTotal.

List of all members.

Public Member Functions

Public Attributes


Detailed Description

Definition at line 11 of file ot_subtotal.php.


Constructor & Destructor Documentation

ot_subtotal::__construct (  ) 

Definition at line 17 of file ot_subtotal.php.

00017                          {
00018     $this->code = __CLASS__;
00019     $this->title = __('module order total subtotal title');
00020     $this->description = __('module order total subtotal description');
00021     $this->sort_order = (defined('MODULE_ORDER_TOTAL_SUBTOTAL_SORT_ORDER')) ? MODULE_ORDER_TOTAL_SUBTOTAL_SORT_ORDER : 0;
00022     $this->enabled = true;
00023     $this->shopping_cart=true; // active mode process
00024     $this->output = array();
00025     $this->pre_output = array();
00026   }


Member Function Documentation

ot_subtotal::check (  ) 

Sepcific for module.

Definition at line 60 of file ot_subtotal.php.

00060                    {
00061     if (!isset($this->_check)) {
00062       $check_query = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_ORDER_TOTAL_SUBTOTAL_STATUS'");
00063       $this->_check = tep_db_num_rows($check_query);
00064     }
00065 
00066     return $this->_check;
00067   }

ot_subtotal::install (  ) 

Definition at line 73 of file ot_subtotal.php.

00073                        {
00074 //       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 ('Affichage du sous-total', 'MODULE_ORDER_TOTAL_SUBTOTAL_STATUS', 'true', 'Voulez-vous montrer le sous-total de la commande ?', '6', '1','tep_cfg_select_option(array(\'true\', \'false\'), ', now())");
00075       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_ORDER_TOTAL_SUBTOTAL_SORT_ORDER', '1', 'Ordre de tri pour l\'affichage (Le plus petit nombre est montré en premier).', '6', '2', now())");
00076     }

ot_subtotal::keys (  ) 

Definition at line 69 of file ot_subtotal.php.

Referenced by remove().

00069                   {
00070     return array(/*'MODULE_ORDER_TOTAL_SUBTOTAL_STATUS',*/ 'MODULE_ORDER_TOTAL_SUBTOTAL_SORT_ORDER');
00071   }

ot_subtotal::process (  ) 

depend checkout_xxx

Definition at line 31 of file ot_subtotal.php.

00031                             {
00032     global $order, $currencies;
00033 
00034     $this->output[] = array('title' => $this->title . ':',
00035                             'text_ht' => $currencies->format($order->info['subtotal_ht'], true, $order->info['currency'], $order->info['currency_value']),
00036                             'text' => $currencies->format($order->info['subtotal'], true, $order->info['currency'], $order->info['currency_value']),
00037                             'value_ht' => $order->info['subtotal_ht'],
00038                             'value' => $order->info['subtotal']
00039                             );
00040   }

ot_subtotal::remove (  ) 

Definition at line 78 of file ot_subtotal.php.

00078                       {
00079       tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')");
00080     }

ot_subtotal::show_list_total (  ) 
Remarks:
shopping_cart.php

Definition at line 45 of file ot_subtotal.php.

00045                                     {
00046     global  $currencies,  $cart;
00047     $this->pre_output = new objectInfo(array('text'=>$this->title,
00048                                             'value'=> $cart->ListTotal
00049                                             )
00050                                       );
00051    ;
00052 
00053     return $this->pre_output;
00054   }


Member Data Documentation

ot_subtotal::$output

Definition at line 15 of file ot_subtotal.php.

ot_subtotal::$title

Definition at line 13 of file ot_subtotal.php.


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