Quick Search:

Mode

Context

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

Other Diffs

Ignore

Blank Lines Whitespace:

Diff

434
 
435
 
435
 
order_total.php
_> 11 <?php
  22 /*
<> 3 -  $Id: order_total.php 434 2006-02-15 20:49:45Z hpdl $
   3+  $Id: order_total.php 435 2006-02-16 10:02:53Z hpdl $
44 
  55   osCommerce, Open Source E-Commerce Solutions
  66   http://www.oscommerce.com
     
 !
1818     function osC_OrderTotal() {
  1919       global $osC_Database, $osC_Language;
  2020 
<>  21+      if (isset($_SESSION['osC_OrderTotal_data']) === false) {
   22+        $_SESSION['osC_OrderTotal_data'] = array('cartID' => null,
   23+                                                 'output' => array());
   24+      }
   25+
   26+      $this->_data =& $_SESSION['osC_OrderTotal_data'];
   27+
2128       $Qmodules = $osC_Database->query('select code from :table_templates_boxes where modules_group = "order_total"');
  2229       $Qmodules->bindTable(':table_templates_boxes', TABLE_TEMPLATES_BOXES);
  2330       $Qmodules->setCache('modules-order_total');
     
 !
6269     }
  6370 
  6471     function getResult() {
<> 65 -      $order_total_array = array();
   72+      global $osC_ShoppingCart;
6673 
<> 67 -      foreach ($this->_modules as $module) {
  68 -        $module = 'osC_OrderTotal_' . $module;
   74+      if ($this->_data['cartID'] != $osC_ShoppingCart->getCartID()) {
   75+        $this->_data['cartID'] = $osC_ShoppingCart->getCartID();
6976 
<> 70 -        if ($GLOBALS[$module]->getStatus() === true) {
  71 -          $GLOBALS[$module]->process();
   77+        $this->_data['output'] = array();
7278 
<> 73 -          foreach ($GLOBALS[$module]->output as $output) {
  74 -            if (tep_not_null($output['title']) && tep_not_null($output['text'])) {
  75 -              $order_total_array[] = array('code' => $GLOBALS[$module]->getCode(),
  76 -                                           'title' => $output['title'],
  77 -                                           'text' => $output['text'],
  78 -                                           'value' => $output['value'],
  79 -                                           'sort_order' => $GLOBALS[$module]->getSortOrder());
   79+        foreach ($this->_modules as $module) {
   80+          $module = 'osC_OrderTotal_' . $module;
   81+
   82+          if ($GLOBALS[$module]->getStatus() === true) {
   83+            $GLOBALS[$module]->process();
   84+
   85+            foreach ($GLOBALS[$module]->output as $output) {
   86+              if (tep_not_null($output['title']) && tep_not_null($output['text'])) {
   87+                $this->_data['output'][] = array('code' => $GLOBALS[$module]->getCode(),
   88+                                                 'title' => $output['title'],
   89+                                                 'text' => $output['text'],
   90+                                                 'value' => $output['value'],
   91+                                                 'sort_order' => $GLOBALS[$module]->getSortOrder());
   92+              }
8093             }
  8194           }
  8295         }
  8396       }
  8497 
<> 85 -      return $order_total_array;
   98+      return $this->_data['output'];
<_ 8699     }
  87100 
  88101     function hasActive() {