function quote($method = '', $module = '') { global $total_weight, $shipping_weight, $shipping_quoted, $shipping_num_boxes; $quotes_array = array(); if (is_array($this->modules)) { $shipping_quoted = ''; $shipping_num_boxes = 1; $shipping_weight = $total_weight; if (SHIPPING_BOX_WEIGHT >= $shipping_weight * SHIPPING_BOX_PADDING / 100) { $shipping_weight = $shipping_weight + SHIPPING_BOX_WEIGHT; } else { $shipping_weight = $shipping_weight + $shipping_weight * SHIPPING_BOX_PADDING / 100; } if ($shipping_weight > SHIPPING_MAX_WEIGHT) { // Split into many boxes $shipping_num_boxes = ceil($shipping_weight / SHIPPING_MAX_WEIGHT); $shipping_weight = $shipping_weight / $shipping_num_boxes; } $include_quotes = array(); reset($this->modules); while (list(, $value) = each($this->modules)) { $class = substr($value, 0, strrpos($value, '.')); if (tep_not_null($module)) { tep_log_ex('$value=' . $value . ', $class=' . $class . ', $module=' . $module . ', enabled=' . $GLOBALS[$class]->enabled); if ($module == $class && $GLOBALS[$class]->enabled) { $include_quotes[] = $class; } } elseif ($GLOBALS[$class]->enabled) { $include_quotes[] = $class; } } $size = sizeof($include_quotes); for ($i = 0; $i < $size; $i++) { $quotes = $GLOBALS[$include_quotes[$i]]->quote($method); if (is_array($quotes)) { $quotes_array[] = $quotes; } } } return $quotes_array; }
$navigation->set_snapshot(); } tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL')); } // if there is nothing in the customers cart, redirect them to the shopping cart page if ($cart->count_contents() < 1) { tep_redirect(tep_href_link(FILENAME_SHOPPING_CART)); } // if no shipping method has been selected, redirect the customer to the shipping method selection page if (!tep_session_is_registered('shipping')) { tep_redirect(tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL')); } elseif (empty($shipping) && ALLOW_CHECKOUT_SHIPPING == 'true' && $cart->get_content_type() != 'virtual') { $messageStack->add_session('header', ERROR_NO_SHIPPING_MODULE_SELECTED); tep_redirect(tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL')); } tep_log_ex('shipping'); // avoid hack attempts during the checkout procedure by checking the internal cartID if (isset($cart->cartID) && tep_session_is_registered('cartID')) { if ($cart->cartID != $cartID) { tep_redirect(tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL')); } } $content = FILENAME_CHECKOUT_PAYMENT; $javascript = 'checkout_payment.js.php'; $page_query = tep_db_query("select pages_id, pages_name, pages_additional_description, pages_description from " . TABLE_PAGES . " where pages_filename = '" . tep_db_input(basename($content)) . "' and language_id = '" . (int) $languages_id . "'"); $page = tep_db_fetch_array($page_query); define('ADDITIONAL_DESCRIPTION', $page['pages_additional_description']); $translation_query = tep_db_query("select pages_translation_key, pages_translation_value from " . TABLE_PAGES_TRANSLATION . " where pages_filename = '" . tep_db_input(basename($content)) . "' and language_id = '" . (int) $languages_id . "'"); while ($translation = tep_db_fetch_array($translation_query)) { define($translation['pages_translation_key'], $translation['pages_translation_value']); }