query($sql); while ( $row_country = $db->fetch_array($rs_country)) { $couponcode = $row_country["couponcode"]; if ($couponcode!="") { $sql ="UPDATE coupon SET quota=quota-1 WHERE customcode = '".$couponcode."'"; $db->query($sql); } $sql ="UPDATE `tb_order_list` SET paymentstatus='success', showc=1 WHERE `id` = '".$id."'"; $db->query($sql); $sql ="UPDATE `tb_order_product` SET showc=1 WHERE `order_id` = '".$id."'"; $db->query($sql); $sqlproduct = "SELECT * FROM `tb_order_product` where `order_id`=".$id." and showc=1 "; $rs_product = $db->query($sqlproduct); while ( $row_product = $db->fetch_array($rs_product)) { $pid = $row_product["product_id"]; $quantity = $row_product["quantity"]; $size = $row_product["size"]; if (1) { $sqlpc = "SELECT * FROM `products` where id=".$pid." and display=1 "; $rs_pc = $db->query($sqlpc); while ( $row_pc = $db->fetch_array($rs_pc)) { $qunxs = $row_pc["qunxs"]; $quns = $row_pc["quns"]; $qunm = $row_pc["qunm"]; $qunl = $row_pc["qunl"]; $qunxl = $row_pc["qunxl"]; } if ($size =="XS" || $qunxs >= 1 ) { $sql ="UPDATE `products` SET qunxs=qunxs-".$quantity." WHERE `id` = '".$pid."'"; $db->query($sql); } if ($size =="S" || $quns >= 1 ) { $sql ="UPDATE `products` SET quns=quns-".$quantity." WHERE `id` = '".$pid."'"; $db->query($sql); } if ($size =="M" || $qunm >= 1 ) { $sql ="UPDATE `products` SET qunm=qunm-".$quantity." WHERE `id` = '".$pid."'"; $db->query($sql); } if ($size =="L" || $qunl >= 1 ) { $sql ="UPDATE `products` SET qunl=qunl-".$quantity." WHERE `id` = '".$pid."'"; $db->query($sql); } if ($size =="XL" || $qunxl >= 1 ) { $sql ="UPDATE `products` SET qunxl=qunxl-".$quantity." WHERE `id` = '".$pid."'"; $db->query($sql); } } } } session_destroy(); echo ""; } if($id != ""){ // $sql_country = "SELECT * FROM `tb_shipping_country` WHERE `display` = '1' ORDER BY `zone_id` ASC, `id` ASC"; $sql = "SELECT * FROM `tb_order_product` where order_id=".$id." and showc<1 "; $regpaycount=0; $rs_country = $db->query($sql); $country_list = ""; while ( $row_country = $db->fetch_array($rs_country)) { $regpaycount++; // $row_shipping = $db->getrow($sql_shipping); // if ( $_SESSION['currency']=='1') $shipping = $row_shipping['price_usd']; // else $shipping = $row_shipping['price_hkd']; // if ($shipping == '0') $shipping = 'Free'; //$country_list .= ""; $print_large_fav .="".' '.$photo['alt'].' '.$row_country['{$_SESSION["lang"]}name']." -- (".$row_country['model_no'].')
'.$row_country["color"].' '.$row_country["size"].'
'.$row_country["quantity"].'
'.$row_country["unit_price"].' '; } } ?>

[ ]



0 ) {?>
Product Description Color Size Quantity Unit Price Total
產品 描述 顏色 尺寸 數量 單價 總數
产品 描述 颜色 尺寸 数量 单价 总数
TOTAL =
query($sqlpaymentmethod); $tempcount=0; while($rowpaymentmethod = $db->fetch_array($rspaymentmethod)) { $tempcount++; $templist .= ' '.$rowpaymentmethod["en_show"].'
'; } echo $templist; ?>