0) { while($Fetitem = mysql_fetch_array($objitem)) { $menuid=$Fetitem['id']; $menuid_d_s=$Fetitem['productid']; $si=$si+1; $qty=$Fetitem['qty']; $objmenu=mysql_query("SELECT * from shop_product where product_id='$menuid_d_s'"); $resmenu=mysql_fetch_array($objmenu); $menuname=$resmenu['name']; $productprice=$resmenu['price']; $productprice_int=$resmenu['points']; $totprice=($qty*$resmenu['price']); $totprice_int=($qty*$resmenu['points']); $new_price +=$totprice; $country; if($country=="India") { } else { } $vstatus=$resmenu['vstatus']; $weight=$resmenu['stock_status_id']; $vid_type = $resmenu['v_s']; if($vid_type !=1){ if($weight=='' || $weight==0) { $weight=100; } } else{ $weight = 0; } if($new_status==1) { if($vstatus==1) { $v_qty=($qty/2); } if($vstatus==6) { $v_qty=($qty/2); } if($vstatus==7) { $v_qty=($qty/2); } if($vstatus==2) { $v_qty=($qty/4); } $x = (int)$v_qty; } else { $x=0; } $x; $new_qty=($weight*($qty+$x)); $new_kilo=($new_qty/1000); $new_kilo_1 = explode('.',$new_kilo); $new_kilo_2=$new_kilo_1[0]; // Before the Decimal point $new_kilo_3 +=$new_kilo_2; $totprice1 +=$totprice; $tot_weight_2 +=$new_qty; $Query_job_move_product = mysql_query("SELECT * from shop_product_image where product_id='$menuid_d_s' order by product_id asc "); $row_job_move_product_id = mysql_fetch_array($Query_job_move_product); ?> 0){ $get_or = mysqli_query($conn, "select * from tbl_adc_courier_charges where id=1"); $get_adc = mysqli_fetch_array($get_or, MYSQLI_ASSOC); if($int_weight <= 0.5){ $tot_ship = $get_adc['courier_500g'] + $get_adc['adc_3.5kg'] ; }elseif($int_weight > 0.5 ){ $no_of_units = ceil($int_weight/0.5); $courier_kirupa = $no_of_units * $get_adc['courier_500g']; $adc = $int_weight / 3.5; $split = ceil($adc); $tot_ship = $courier_kirupa + ($split * $get_adc['adc_3.5kg']); } }else{ $tot_ship = 0; } ?> 0 ){ echo $new_kilo_4= (revised_shipping($new_kilo_41, $new_state, $conn) + $packing_charges); // echo $new_kilo_4=((($new_kilo_6+1)*$courier_fees)+$packing_charges); }else{ echo $new_kilo_4 = "0.00"; } } } else { $tot_weight_2_int=$tot_weight_2; $Query_job_move_courier_country= mysql_query("SELECT * from tbl_courier_charges_country where state='$country' "); $row_job_move_courier_country= mysql_fetch_array($Query_job_move_courier_country); $num_max_ship_int=mysql_num_rows($Query_job_move_courier_country); if($num_max_ship_int>0) { $courier_fees_country=$row_job_move_courier_country['amount']; $courier_fees_country_extra=$row_job_move_courier_country['additional_amount']; } else { $Query_job_move_courier_country= mysql_query("SELECT * from tbl_courier_charges_country where state='Others' "); $row_job_move_courier_country= mysql_fetch_array($Query_job_move_courier_country); $courier_fees_country=$row_job_move_courier_country['amount']; $courier_fees_country_extra=$row_job_move_courier_country['additional_amount']; } if($tot_weight_2_int<=500) { $courier_fees_country_1=$courier_fees_country; } else { $tot_weight_2_int_1=($tot_weight_2_int-500); $tot_weight_2_int_1_2=($tot_weight_2_int_1/250); $new_kilo_5_int = explode('.',$tot_weight_2_int_1_2); $new_kilo_6_int=$new_kilo_5_int[0]; $new_kilo_6_int_7=($new_kilo_6_int+1); $new_kilo_6_int_7_8=($courier_fees_country_extra*$new_kilo_6_int_7); $courier_fees_country_1=($courier_fees_country+$new_kilo_6_int_7_8); } ?> 0 && $weight <=1){ $courier = $set_c['amount']; }elseif($weight > 1 && $weight <=2){ $courier = $set_c['amount'] *2; }elseif($weight > 2){ $extra = $weight - 2; $courier = ($set_c['amount'] * 2) + (ceil($extra) * $set_c['3_rd_kg']); } return $courier; } ?>