} } if ($coupon_errors) { $t->set_var("errors_list", $coupon_errors); $t->set_var("coupon_code", htmlspecialchars($coupon_code)); $t->parse("coupon_errors", false); } else { $t->set_var("coupon_code", ""); $t->set_var("coupon_errors", ""); } // parse goods total values $t->set_var("total_quantity", $total_quantity); //Customization by Vital $delivery_site_id = isset($site_id) ? $site_id : ""; $country_id = get_param("country_id") ? get_param("country_id") : "228"; $shipping_types = get_shipping_types($country_id, "", "", $delivery_site_id, $user_type_id, $cart_items); list($row_shipping_type_id, $row_shipping_type_code, $row_shipping_type_desc, $row_shipping_cost, $row_tare_weight, $row_shipping_taxable, $row_shipping_time) = $shipping_types[0]; $t->set_var("shipping_type_desc", $row_shipping_type_desc); //$t->set_var("shipping_type_desc", var_export($shopping_cart)); $t->set_var("estimated_US_shipping", currency_format($row_shipping_cost)); $t->set_var("estimated_total", currency_format($row_shipping_cost + $goods_total_incl_tax)); $countries = get_db_values("SELECT country_id,country_name FROM " . $table_prefix . "countries WHERE show_for_user=1 ORDER BY country_order, country_name ", array(array("", SELECT_COUNTRY_MSG))); $selected_country = $country_id == 228 ? "" : $country_id; set_options($countries, $selected_country, "country_id"); //END customization // show total reward credits if ($credit_system && $reward_credits_basket && $total_reward_credits && ($reward_credits_users == 0 || $reward_credits_users == 1 && $user_id)) { $t->set_var("reward_credits_total", currency_format($total_reward_credits)); $t->sparse("reward_credits_total_block", false); } // show total reward points
$total_shipping_types = 0; $shipping_type_id = ""; $shipping_type_code = ""; $shipping_type_desc = ""; $tare_weight = 0; $shipping_cost = 0; $shipping_taxable = 0; $shipping_taxable_value = 0; // todo delete $shipping_tax = 0; $shipping_points_amount = 0; if ($country_id && $shipping_quantity) { $shipping_pay_points = get_param("shipping_pay_points"); $delivery_site_id = isset($site_id) ? $site_id : ""; include "./includes/shipping_functions.php"; $shipping_types = get_shipping_types($country_id, $state_id, $postal_code, $delivery_site_id, $user_type_id, $cart_items); $shipping_type_id_param = get_param("shipping_type_id"); $total_shipping_types = sizeof($shipping_types); if ($total_shipping_types == 1) { $shipping_control = "HIDDEN"; } else { if ($total_shipping_types > 1) { if ($shipping_block == 1) { $shipping_control = "LISTBOX"; } else { $shipping_control = "RADIO"; } } } for ($st = 0; $st < $total_shipping_types; $st++) { list($row_shipping_type_id, $row_shipping_type_code, $row_shipping_type_desc, $row_shipping_cost, $row_tare_weight, $row_shipping_taxable, $row_shipping_time) = $shipping_types[$st];