ot_tax Class Reference

Inherits InterfaceModule, and InterfaceAcaOrderTotal.

List of all members.

Public Member Functions

Public Attributes


Detailed Description

Definition at line 11 of file ot_tax.php.


Constructor & Destructor Documentation

ot_tax::__construct (  ) 

Definition at line 16 of file ot_tax.php.

00016                                 {
00017     $this->code = __CLASS__;
00018     $this->title = __('module order total tax title');
00019     $this->description = __('module order total tax description');
00020     $this->sort_order = (defined('MODULE_ORDER_TOTAL_TAX_SORT_ORDER')) ? MODULE_ORDER_TOTAL_TAX_SORT_ORDER : 4 ;
00021     $this->enabled = true;
00022 
00023     $this->output = array();
00024   }


Member Function Documentation

ot_tax::check (  ) 

Definition at line 40 of file ot_tax.php.

00040                           {
00041     if (!isset($this->_check)) {
00042       $check_query = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_ORDER_TOTAL_TAX_SORT_ORDER'");
00043       $this->_check = tep_db_num_rows($check_query);
00044     }
00045 
00046     return $this->_check;
00047   }

ot_tax::install (  ) 

Definition at line 53 of file ot_tax.php.

00053                             {
00054     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_TAX_SORT_ORDER', '3', 'Ordre de tri pour l\'affichage (Le plus petit nombre est montré en premier).', '6', '2', now())");
00055   }

ot_tax::keys (  ) 

Definition at line 49 of file ot_tax.php.

Referenced by remove().

00049                          {
00050     return array('MODULE_ORDER_TOTAL_TAX_SORT_ORDER');
00051   }

ot_tax::process (  ) 

Definition at line 26 of file ot_tax.php.

00026                             {
00027     global $order, $currencies;
00028 
00029     reset($order->info['tax_groups']);
00030     while (list($key, $value) = each($order->info['tax_groups'])) {
00031       if ($value > 0) {
00032         $this->output[] = array('title' => 'dont '. $key . ':',
00033                                 'text' => $currencies->format($value, true, $order->info['currency'], $order->info['currency_value']),
00034                                 'value_ht' => 0,
00035                                 'value' => 0/*$value*/);
00036       }
00037     }
00038   }

ot_tax::remove (  ) 

Definition at line 57 of file ot_tax.php.

00057                            {
00058     tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')");
00059   }


Member Data Documentation

ot_tax::$output

Definition at line 14 of file ot_tax.php.

ot_tax::$title

Definition at line 13 of file ot_tax.php.


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