echo TITLE_SHIPPING_ADDRESS; ?> </div> <div class="panel-body"> <?php echo tep_address_label($customer_id, $sendto, true, ' ', '<br />'); ?> </div> </div> </div> </div> <div class="clearfix"></div> <?php if (tep_count_shipping_modules() > 0) { ?> <h2><?php echo TABLE_HEADING_SHIPPING_METHOD; ?> </h2> <?php if (sizeof($quotes) > 1 && sizeof($quotes[0]) > 1) { ?> <div class="contentText"> <div class="alert alert-warning"> <div class="row"> <div class="col-xs-8">
} break; case 'both': $pass = true; break; } if ($pass == true && $order->info['total'] >= MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING_OVER) { $free_shipping = true; include DIR_WS_LANGUAGES . $language . '/ot_shipping.php'; } } if (!tep_session_is_registered('shipping')) { tep_session_register('shipping'); } $shipping = false; if (tep_count_shipping_modules() > 0 || $free_shipping == true) { if ($free_shipping == true) { $shipping = 'free_free'; } else { // get all available shipping quotes $quotes = $shipping_modules->quote(); // select cheapest shipping method $shipping = $shipping_modules->cheapest(); $shipping = $shipping['id']; } } if (strpos($shipping, '_')) { list($module, $method) = explode('_', $shipping); if (is_object(${$module}) || $shipping == 'free_free') { if ($shipping == 'free_free') { $quote[0]['methods'][0]['title'] = FREE_SHIPPING_TITLE;
function setShippingMethod($method = '') { global $shipping_modules, $language, $order, $cart, $shipping, $onepage; if (defined('MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING') && MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING == 'true') { $pass = false; switch (MODULE_ORDER_TOTAL_SHIPPING_DESTINATION) { case 'national': if ($order->delivery['country_id'] == STORE_COUNTRY) { $pass = true; } break; case 'international': if ($order->delivery['country_id'] != STORE_COUNTRY) { $pass = true; } break; case 'both': $pass = true; break; } // disable free shipping for Alaska and Hawaii $zone_code = tep_get_zone_code($order->delivery['country']['id'], $order->delivery['zone_id'], ''); if (in_array($zone_code, array('AK', 'HI'))) { $pass = false; } $free_shipping = false; if ($pass == true && $order->info['total'] >= MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING_OVER) { $free_shipping = true; include DIR_WS_LANGUAGES . $language . '/modules/order_total/ot_shipping.php'; } } else { $free_shipping = false; } if (!tep_session_is_registered('shipping')) { tep_session_register('shipping'); } $shipping = false; $onepage['info']['shipping_method'] = false; if (tep_count_shipping_modules() > 0 || $free_shipping == true) { if (strpos($method, '_')) { $shipping = $method; list($module, $method) = explode('_', $shipping); global ${$module}; if (is_object(${$module}) || $shipping == 'free_free') { $quote = $shipping_modules->quote($method, $module); if (isset($quote['error'])) { unset($shipping); } else { if (isset($quote[0]['methods'][0]['title']) && isset($quote[0]['methods'][0]['cost']) || $shipping == 'free_free') { $shipping = array('id' => $shipping, 'title' => $shipping == 'free_free' ? FREE_SHIPPING_TITLE : $quote[0]['module'], 'description' => $shipping == 'free_free' ? FREE_SHIPPING_TITLE : $quote[0]['module'] . ':<br />' . $quote[0]['methods'][0]['title'], 'cost' => $shipping == 'free_free' ? '0' : $quote[0]['methods'][0]['cost']); $onepage['info']['shipping_method'] = $shipping; } } } else { unset($shipping); } } } return '{ "success": "true" }'; }
function _process() { global $osC_Session, $free_shipping, $shipping_modules; if (tep_not_null($_POST['comments'])) { $osC_Session->set('comments', tep_sanitize_string($_POST['comments'])); } if (tep_count_shipping_modules() > 0 || $free_shipping == true) { if (isset($_POST['shipping']) && strpos($_POST['shipping'], '_')) { $osC_Session->set('shipping', $_POST['shipping']); list($module, $method) = explode('_', $osC_Session->value('shipping')); if (is_object($GLOBALS[$module]) || $osC_Session->value('shipping') == 'free_free') { if ($osC_Session->value('shipping') == 'free_free') { $quote[0]['methods'][0]['title'] = FREE_SHIPPING_TITLE; $quote[0]['methods'][0]['cost'] = '0'; } else { $quote = $shipping_modules->quote($method, $module); } if (isset($quote['error'])) { $osC_Session->remove('shipping'); } else { if (isset($quote[0]['methods'][0]['title']) && isset($quote[0]['methods'][0]['cost'])) { $shipping = array('id' => $osC_Session->value('shipping'), 'title' => $free_shipping == true ? $quote[0]['methods'][0]['title'] : $quote[0]['module'] . ' (' . $quote[0]['methods'][0]['title'] . ')', 'cost' => $quote[0]['methods'][0]['cost']); $osC_Session->set('shipping', $shipping); tep_redirect(tep_href_link(FILENAME_CHECKOUT, 'payment', 'SSL')); } } } else { $osC_Session->remove('shipping'); } } } else { $osC_Session->set('shipping', false); tep_redirect(tep_href_link(FILENAME_CHECKOUT, 'payment', 'SSL')); } }
<?php echo '<h3 class="no-margin-top">' . TITLE_SHIPPING_ADDRESS . '</h3>'; ?> <?php echo tep_address_label($_SESSION['customer_id'], $_SESSION['sendto'], true, ' ', '<br>'); ?> </div> </div> </div> <div class="row" > <div class="col-sm-12 col-lg-12 well clearfix" style="margin-left:-4px"> <div > <?php if (tep_count_shipping_modules() > 0 || MVS_STATUS == 'true') { if (MVS_STATUS == 'true') { require DIR_WS_MODULES . 'vendor_shipping.php'; } else { if (SHOW_HEADING_TITLE_ORIGINAL == 'yes') { ?> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="pageHeading"><h3 class="no-margin-top"><?php echo TABLE_HEADING_SHIPPING_METHOD; ?> </h3></td> </tr> </table></td> </tr>
} // disable free shipping for Alaska and Hawaii $zone_code = tep_get_zone_code($order->delivery['country']['id'], $order->delivery['zone_id'], ''); if (in_array($zone_code, array('AK', 'HI'))) { $pass = false; } $free_shipping = false; if ($pass == true && $order->info['total'] - $order->info['shipping_cost'] >= MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING_OVER) { $free_shipping = true; //include(DIR_WS_LANGUAGES . $language . '/modules/order_total/ot_shipping.php'); } } else { $free_shipping = false; } $quotes = $shipping_modules->quote(); if (!tep_session_is_registered('shipping') || tep_session_is_registered('shipping') && $shipping == false && tep_count_shipping_modules() > 1) { if (tep_session_is_registered('shipping')) { tep_session_unregister('shipping'); } tep_session_register('shipping'); if ($free_shipping == false) { $shipping = $shipping_modules->cheapest(); } else { $shipping = array('id' => 'free_free', 'title' => FREE_SHIPPING_TITLE, 'cost' => '0'); } } ?> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <?php if (sizeof($quotes) > 1 && sizeof($quotes[0]) > 1) { ?>