Quick Search:

Mode

Context

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

Other Diffs

Ignore

Blank Lines Whitespace:

Diff

427
 
432
 
432
 
shipping.php
_> 11 <?php
  22 /*
<> 3 -  $Id: shipping.php 427 2006-02-14 13:17:50Z hpdl $
   3+  $Id: shipping.php 432 2006-02-15 07:41:34Z hpdl $
44 
  55   osCommerce, Open Source E-Commerce Solutions
  66   http://www.oscommerce.com
     
 !
1515         $_quotes = array(),
  1616         $_shipping_boxes = 1,
  1717         $_shipping_weight = 0,
<> 18 -        $_keys;
   18+        $_keys,
   19+        $_group = 'shipping';
1920 
  2021 // class constructor
  2122     function osC_Shipping($module = '') {
     
 !
6263       }
  6364     }
  6465 
<>  66+// class methods
   67+    function getCode() {
   68+      return $this->_code;
   69+    }
   70+
   71+    function getTitle() {
   72+      return $this->_title;
   73+    }
   74+
   75+    function getDescription() {
   76+      return $this->_description;
   77+    }
   78+
   79+    function getStatus() {
   80+      return $this->_status;
   81+    }
   82+
   83+    function getSortOrder() {
   84+      return $this->_sort_order;
   85+    }
   86+
6587     function calculateQuotes() {
  6688       global $osC_ShoppingCart;
  6789 
     
 !
83105 
  84106         $include_quotes = array();
  85107 
<> 86 -        if (defined('MODULE_SHIPPING_FREE_STATUS') && (MODULE_SHIPPING_FREE_STATUS == 'True') && ($GLOBALS['osC_Shipping_free']->enabled)) {
   108+        if (defined('MODULE_SHIPPING_FREE_STATUS') && (MODULE_SHIPPING_FREE_STATUS == 'True') && ($GLOBALS['osC_Shipping_free']->getStatus() === true)) {
87109           $include_quotes[] = 'free';
  88110         } else {
  89111           foreach ($this->_modules as $module) {
<> 90 -            if ($GLOBALS['osC_Shipping_' . $module]->enabled) {
   112+            if ($GLOBALS['osC_Shipping_' . $module]->getStatus() === true) {
91113               $include_quotes[] = 'osC_Shipping_' . $module;
  92114             }
  93115           }
     
 !
144166 
  145167         foreach ($this->_modules as $value) {
  146168           $class = 'osC_Shipping_' . $value;
<> 147 -          if ($GLOBALS[$class]->enabled) {
   169+          if ($GLOBALS[$class]->getStatus() === true) {
148170             $quotes = $GLOBALS[$class]->quotes;
  149171 
  150172             for ($i=0, $n=sizeof($quotes['methods']); $i<$n; $i++) {
     
 !
180202         $has_active = false;
  181203 
  182204         foreach ($this->_modules as $module) {
<> 183 -          if ($GLOBALS['osC_Shipping_' . $module]->enabled) {
   205+          if ($GLOBALS['osC_Shipping_' . $module]->getStatus() === true) {
184206             $has_active = true;
  185207             break;
  186208           }
     
 !
270292     }
  271293 
  272294     function _usortModules($a, $b) {
<> 273 -      if ($GLOBALS['osC_Shipping_' . $a]->sort_order == $GLOBALS['osC_Shipping_' . $b]->sort_order) {
  274 -        return strnatcasecmp($GLOBALS['osC_Shipping_' . $a]->title, $GLOBALS['osC_Shipping_' . $a]->title);
   295+      if ($GLOBALS['osC_Shipping_' . $a]->getSortOrder() == $GLOBALS['osC_Shipping_' . $b]->getSortOrder()) {
   296+        return strnatcasecmp($GLOBALS['osC_Shipping_' . $a]->getTitle(), $GLOBALS['osC_Shipping_' . $a]->getTitle());
275297       }
  276298 
<> 277 -      return ($GLOBALS['osC_Shipping_' . $a]->sort_order < $GLOBALS['osC_Shipping_' . $b]->sort_order) ? -1 : 1;
   299+      return ($GLOBALS['osC_Shipping_' . $a]->getSortOrder() < $GLOBALS['osC_Shipping_' . $b]->getSortOrder()) ? -1 : 1;
<_ 278300     }
  279301   }
  280302 ?>