  |
1 | 1 | | <?php |
| |
2 | 2 | | /* |
  |
3 | | - | $Id: shipping.php 831 2006-08-29 12:48:40Z hpdl $ |
| |
| 3 | + | $Id: shipping.php 865 2006-08-30 01:22:41Z hpdl $ |
|
4 | 4 | | |
| |
5 | 5 | | osCommerce, Open Source E-Commerce Solutions |
| |
6 | 6 | | http://www.oscommerce.com |
| |
|
|
 |
… |
|
141 | 141 | | 'title' => $quote['module'] . ((empty($method['title']) === false) ? ' (' . $method['title'] . ')' : ''), |
| |
142 | 142 | | 'cost' => $method['cost'], |
| |
143 | 143 | | 'tax_class_id' => $quote['tax_class_id'], |
  |
144 | | - | 'is_cheapest' => true); |
| |
| 144 | + | 'is_cheapest' => false); |
|
145 | 145 | | } |
| |
146 | 146 | | } |
| |
147 | 147 | | } |
| |
148 | 148 | | |
  |
| 149 | + | if (!empty($rate)) { |
| |
| 150 | + | $rate['is_cheapest'] = true; |
| |
| 151 | + | } |
| |
| 152 | + | |
|
149 | 153 | | return $rate; |
| |
150 | 154 | | } |
| |
151 | 155 | | |
| |
|
|
 |
… |
|
177 | 181 | | if (is_array($this->_modules)) { |
| |
178 | 182 | | $include_quotes = array(); |
| |
179 | 183 | | |
  |
180 | | - | if (defined('MODULE_SHIPPING_FREE_STATUS') && (MODULE_SHIPPING_FREE_STATUS == 'True') && $GLOBALS['osC_Shipping_free']->isEnabled()) { |
| |
| 184 | + | if (defined('MODULE_SHIPPING_FREE_STATUS') && isset($GLOBALS['osC_Shipping_free']) && $GLOBALS['osC_Shipping_free']->isEnabled()) { |
  |
181 | 185 | | $include_quotes[] = 'osC_Shipping_free'; |
| |
182 | 186 | | } else { |
| |
183 | 187 | | foreach ($this->_modules as $module) { |