$dsf_shipping_opens->MoveNext(); } if ($dsf_shipping_open != '') { $data['dsf_shipping_open'] = $dsf_shipping_open; } } $shipping_account_info = $db->Execute('SELECT `company_id`, `packet_codes` FROM `dsf_account_info` WHERE `id`=1 limit 1'); if (!$shipping_account_info->EOF) { $data['company_id'] = $shipping_account_info->fields['company_id']; $data['packet_codes'] = $shipping_account_info->fields['packet_codes']; } //get data from mazentop $dsf_shippings = mazentop_estimator_post(EXTRA_4PX_URL, $data); } else { require DIR_WS_CLASSES . 'DSFShipping.php'; $objDSFShipping = new DSFShipping(); //var_dump($country_info, $total_weight); $dsf_shippings = $objDSFShipping->calculate($country_info['countries_iso_code_2'], $total_weight); } $quotes = array_merge($dsf_shippings, $quotes); //end 4px shipping if (!empty($_POST['gv_redeem_code'])) { //Morrowind Add $gv_choose_shipping = !empty($_SESSION['coupons']['choose_shipping']) ? explode('_', $_SESSION['coupons']['choose_shipping']) : 0; for ($i = 0; $i < sizeof($quotes); $i++) { if ($gv_choose_shipping[0] == $quotes[$i]['id']) { $_SESSION['gv_methods_array'] = $quotes[$i]['methods'][0]; } } //print_r($_SESSION);echo '<hr />';print_r($dsf_shippings);echo '<hr />';print_r($quotes);echo '<hr />';print_r($_SESSION['coupons']['choose_shipping']);die($gv_choose_shipping[0]); $order_total_modules->collect_posts();
$order->delivery = array('country' => array('id' => STORE_COUNTRY, 'title' => $country_info['countries_name'], 'iso_code_2' => $country_info['countries_iso_code_2'], 'iso_code_3' => $country_info['countries_iso_code_3']), 'country_id' => STORE_COUNTRY, 'zone_id' => $state_zone_id, 'format_id' => zen_get_address_format_id($_POST['zone_country_id'])); } // set the cost to be able to calculate free shipping $order->info = array('total' => $_SESSION['cart']->show_total(), 'currency' => $currency, 'currency_value' => $currencies->currencies[$currency]['value']); } // weight and count needed for shipping ! $total_weight = $_SESSION['cart']->show_weight(); $shipping_estimator_display_weight = $total_weight; $total_count = $_SESSION['cart']->count_contents(); require DIR_WS_CLASSES . 'shipping.php'; $shipping_modules = new shipping(); $quotes = $shipping_modules->quote(); //print_r($quotes); //4px shipping require DIR_WS_CLASSES . 'DSFShipping.php'; $objDSFShipping = new DSFShipping(); if (!$country_info) { $country_info = $objDSFShipping->getCountryInfo($_SESSION['customer_id'], $sendto); } //var_dump($country_info, $total_weight); $dsf_shippings = $objDSFShipping->calculate($country_info['countries_iso_code_2'], $total_weight); $quotes = array_merge($dsf_shippings, $quotes); //end 4px shipping //die('here'); $order->info['subtotal'] = $_SESSION['cart']->show_total(); // set selections for displaying $selected_country = $order->delivery['country']['id']; $selected_address = $sendto; //} // eo shipping cost // check free shipping based on order $total