Quick Search:

Mode

Context

Displaying 3 lines of context. None | Less | More | Full

Other Diffs

Ignore

Blank Lines Whitespace:

Diff

431
 
432
 
432
 
order_total.php
_> 11 <?php
  22 /*
<> 3 -  $Id: order_total.php 431 2006-02-15 05:57:09Z hpdl $
   3+  $Id: order_total.php 432 2006-02-15 07:41:34Z hpdl $
44 
  55   osCommerce, Open Source E-Commerce Solutions
  66   http://www.oscommerce.com
     
 !
1313   class osC_OrderTotal {
  1414     var $modules;
  1515 
<>  16+    var $_group = 'order_total';
   17+
1618 // class constructor
  1719     function osC_OrderTotal() {
  1820       global $osC_Database, $osC_Language;
     
 !
3941       }
  4042     }
  4143 
<>  44+// class methods
   45+    function getCode() {
   46+      return $this->_code;
   47+    }
   48+
   49+    function getTitle() {
   50+      return $this->_title;
   51+    }
   52+
   53+    function getDescription() {
   54+      return $this->_description;
   55+    }
   56+
   57+    function getStatus() {
   58+      return $this->_status;
   59+    }
   60+
   61+    function getSortOrder() {
   62+      return $this->_sort_order;
   63+    }
   64+
4265     function process() {
  4366       $order_total_array = array();
  4467 
  4568       foreach ($this->modules as $module) {
  4669         $module = 'osC_OrderTotal_' . $module;
  4770 
<> 48 -        if ($GLOBALS[$module]->enabled) {
   71+        if ($GLOBALS[$module]->getStatus() === true) {
4972           $GLOBALS[$module]->process();
  5073 
  5174           foreach ($GLOBALS[$module]->output as $output) {
  5275             if (tep_not_null($output['title']) && tep_not_null($output['text'])) {
<> 53 -              $order_total_array[] = array('code' => $GLOBALS[$module]->code,
   76+              $order_total_array[] = array('code' => $GLOBALS[$module]->getCode(),
5477                                            'title' => $output['title'],
  5578                                            'text' => $output['text'],
  5679                                            'value' => $output['value'],
<> 57 -                                           'sort_order' => $GLOBALS[$module]->sort_order);
   80+                                           'sort_order' => $GLOBALS[$module]->getSortOrder());
5881             }
  5982           }
  6083         }
     
 !
6992       foreach ($this->modules as $module) {
  7093         $module = 'osC_OrderTotal_' . $module;
  7194 
<> 72 -        if ($GLOBALS[$module]->enabled) {
   95+        if ($GLOBALS[$module]->getStatus() === true) {
7396           foreach ($GLOBALS[$module]->output as $output) {
  7497             $output_string .= '              <tr>' . "\n" .
  7598                               '                <td align="right" class="main">' . $output['title'] . '</td>' . "\n" .
     
 !
89112         $has_active = false;
  90113 
  91114         foreach ($this->modules as $module) {
<> 92 -          if ($GLOBALS['osC_OrderTotal_' . $module]->enabled) {
   115+          if ($GLOBALS['osC_OrderTotal_' . $module]->getStatus() === true) {
93116             $has_active = true;
  94117             break;
  95118           }
     
 !
179202     }
  180203 
  181204     function _usortModules($a, $b) {
<> 182 -      if ($GLOBALS['osC_Shipping_' . $a]->sort_order == $GLOBALS['osC_Shipping_' . $b]->sort_order) {
  183 -        return strnatcasecmp($GLOBALS['osC_Shipping_' . $a]->title, $GLOBALS['osC_Shipping_' . $a]->title);
   205+      if ($GLOBALS['osC_OrderTotal_' . $a]->getSortOrder() == $GLOBALS['osC_OrderTotal_' . $b]->getSortOrder()) {
   206+        return strnatcasecmp($GLOBALS['osC_OrderTotal_' . $a]->getTitle(), $GLOBALS['osC_OrderTotal_' . $a]->getTitle());
184207       }
  185208 
<> 186 -      return ($GLOBALS['osC_Shipping_' . $a]->sort_order < $GLOBALS['osC_Shipping_' . $b]->sort_order) ? -1 : 1;
   209+      return ($GLOBALS['osC_OrderTotal_' . $a]->getSortOrder() < $GLOBALS['osC_OrderTotal_' . $b]->getSortOrder()) ? -1 : 1;
<_ 187210     }
  188211   }
  189212 ?>