0) { while($Fetitem = mysqli_fetch_array($objitem)) { $objitems = mysqli_query($conn, "SELECT * from shop_user where phone='$Fetitem[d_mobile]'"); $item = mysqli_fetch_array($objitems); $new_sataus=$item['new_status']; $menuid=$Fetitem['id']; $menuid_d_s=$Fetitem['productid']; $si=$si+1; $qty=$Fetitem['qty']; $country = $Fetitem['del_country']; $pu_user_id=$_REQUEST['name']; $pu_session_id=$Fetitem['id']; $pu_productid=$Fetitem['productid']; $pu_qty=$Fetitem['qty']; $pu_price=$Fetitem['price']; $pu_totprice=$Fetitem['totprice']; date_default_timezone_set('Asia/Kolkata'); $date = date('Y-m-d H:i:s ', time()); $pu_country=$Fetitem['del_country']; $pu_state=$Fetitem['del_state']; $pu_address=$Fetitem['del_address']; $pu_pin=$Fetitem['del_inp']; $pu_city=$Fetitem['del_city']; $objmenu=mysqli_query($conn, "SELECT * from shop_product where product_id='$menuid_d_s'"); $resmenu=mysqli_fetch_array($objmenu); $menuname=$resmenu['name']; $productprice=$resmenu['price']; $productprice_int=$resmenu['points']; $totprice=($qty*$Fetitem['price']); $totprice_int=($qty*$resmenu['points']); $new_price +=$totprice_int; $country=addslashes($_REQUEST['country']); $name=addslashes($_REQUEST['name']); $state=addslashes($_REQUEST['state']); $pincode=addslashes($_REQUEST['pincode']); $mobileno=addslashes($_REQUEST['mobileno']); $address=addslashes($_REQUEST['address']); $name=addslashes($_REQUEST['name']); $vstatus=$resmenu['vstatus']; $weight=$resmenu['stock_status_id']; if($weight=='' || $weight==0) { $weight=100; } 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 = mysqli_query($conn, "SELECT * from shop_product_image where product_id='$menuid_d_s' order by product_id asc "); $row_job_move_product_id = mysqli_fetch_array($Query_job_move_product); } } echo number_format((float)$totprice1, 2, '.', ''); ?>