芝麻web文件管理V1.00
编辑当前文件:/home/krishnamexports/public_html/ajax/updateCart.php
0) { $_SESSION['kxproductList2'] = array(); foreach($_SESSION['kxproductList'] as $pL) { if($pL['productId']==$productId && $pL['polishId']==$polishId && $pL['sizeId']==$sizeId) { $sqlProduct = mysqli_query($cn,"select * from `tbl_product` where `id`='".$pL['productId']."'"); $sqlProductData = mysqli_fetch_array($sqlProduct); array_push($_SESSION['kxproductList2'],array("productId" =>$pL['productId'], "qty"=>$qty, "polishId"=>$pL['polishId'], "sizeId"=>$pL['sizeId'], "productName"=>$pL['productName'], "productPrice"=>currencyPrice($sqlProductData['price']), "productPhoto"=>productDefaultPhoto($pL['productId']), "productSlugURL"=>$sqlProductData['slug_url'])); $subTotal = $subTotal + ($qty * $sqlProductData['price']); $deliveryCharges = $deliveryCharges + $sqlProductData['delivery_charge']; } else { $sqlProduct = mysqli_query($cn,"select * from `tbl_product` where `id`='".$pL['productId']."'"); $sqlProductData = mysqli_fetch_array($sqlProduct); $subTotal = $subTotal + ($pL['qty'] * $sqlProductData['price']); $deliveryCharges = $deliveryCharges + $sqlProductData['delivery_charge']; array_push($_SESSION['kxproductList2'],array("productId" =>$pL['productId'], "qty"=>$pL['qty'], "polishId"=>$pL['polishId'], "sizeId"=>$pL['sizeId'], "productName"=>$pL['productName'], "productPrice"=>currencyPrice($sqlProductData['price']), "productPhoto"=>productDefaultPhoto($pL['productId']), "productSlugURL"=>$sqlProductData['slug_url'])); } } $_SESSION['kxproductList'] = array(); $_SESSION['kxproductList'] = $_SESSION['kxproductList2']; $orderTotal = $subTotal + $deliveryCharges; $arr = array('status'=>$status, 'msg'=>$msg, 'productCount'=>count($_SESSION['kxproductList']), 'subTotal'=>currencyPrice($subTotal), 'deliveryCharges'=>currencyPrice($deliveryCharges), 'orderTotal'=>currencyPrice($orderTotal), 'productList'=>$_SESSION['kxproductList']); echo json_encode($arr); } else { $msg = "Somethig Went Wrong. Try Again."; $arr = array('status'=>2, 'msg'=>$msg); echo json_encode($arr); } } else { $msg = "Somethig Went Wrong. Try Again."; $arr = array('status'=>2, 'msg'=>$msg); echo json_encode($arr); } ?>