alert('Please the payment method!')";
if ( $_SESSION['cart_id'] == "" || $_SESSION['cart_id']==0 )
echo "";
echo "";
}
?>
alert('Sorry, Time out!')";
echo "";
} else
{
//$_SESSION["temptotal"]
$totalamount = $_SESSION["amounttotal"] - $_SESSION["coupondiscount"] + $_SESSION["shipfee"] ;
$sql = "INSERT INTO tb_order_list ( id, last_update, valid_code, paid_code, member_id, orderdate,shipdate, `paymenttime`, paymentmethod, paymentstatus, mailreceipt, mailtimes, name,phone,email,address,city,country,state,zip_code,lang,status,total,currency,currenratio,shippingmethod, shipping_charge,couponcode ,couponvalue ,remarks, contactemail, contactname, contactphone )
VALUES (
NULL, now(), '".$successcode."', 'paid_code', '".$_SESSION["loginmail"]."', now(), '00-00-00 00:00:00' ,'00-00-00 00:00:00', '".$paymentmethodbutton."' ,'pending' ,'0','0', '".$receiver."', '".$quotaresult."', '".$quotaresult."', '".$_SESSION["address"]."', 'city','".$country."','state','".$mailcode."','".substr($_SERVER['SCRIPT_NAME'],14,2)."','0' ,'".$totalamount."','".$_SESSION['curr']."','".$_SESSION['currency']."', '".$_SESSION["ProductDelivery"]."','".$_SESSION["shipfee"]."','".$_SESSION["couponcode"]."','".$_SESSION["coupondiscount"]."','".$remark."' ,'".$_SESSION["contactemail"]."' ,'".$_SESSION["contactname"]."' ,'".$_SESSION["contactphone"]."'
);";
$db->query($sql);
$order_id = $db->insert_id();
$order_no = str_pad($order_id+1500, 10, "0", STR_PAD_LEFT);
// echo $sql;
$index=1; // #20160901
for($p=0; $p<$_SESSION['cart_id']; $p++){
if($_SESSION['pid'][$p] != "")
{
if ( $_SESSION['curr']=='RMB' ) $temp = $_SESSION["price1"][$p];
if ( $_SESSION['curr']=='HKD' ) $temp = $_SESSION["price2"][$p];
if ( $_SESSION['curr']=='USD' ) $temp = $_SESSION["price3"][$p];
$temp = round($_SESSION["price1"][$p]*$_SESSION['currency']/$_SESSION["fav_qty"][$p]);
$temp2 = $_SESSION["price1"][$p]*$_SESSION['currency'];
$sql = "INSERT INTO tb_order_product ( id, order_id, product_id, en_name, sc_name, model_no, size, color, quantity, curr_unit, currenratio, amount,unit_price, is_warranty, warranty_year, ship_weight, orderdate )
VALUES (
NULL, '".$order_id."', '".$_SESSION["pid"][$p]."', '".$_SESSION["name"][$p]."', '', '".$_SESSION["code"][$p]."', '".$_SESSION["size"][$p]."', '".$_SESSION["color"][$p]."', '".$_SESSION["fav_qty"][$p]."','".$_SESSION['curr']."', '".$_SESSION['currency']."', '".$temp2."','".$temp."', '', '', '', now() );";
$db->query($sql);
$id2 = $db->insert_id();
if ( $_SESSION['code'][$p]!="" && !empty($_SESSION['code'][$p]) )
$order_list .= '';
$order_list .= '
';
if ( $index > 1 ){
$alipay_subject .= ', '.$cart_item[$pid]['item_no'];
} else {
$alipay_subject .= $cart_item[$pid]['item_no'];
}
$index++;
echo $order_list;
}
}
$_SESSION["receiver"] = $receiver;
$_SESSION["shippingmethod"] = $shippingmethod;
$_SESSION["address"] = $receiveraddress;
$_SESSION["mailcode"] = $mailcode;
$_SESSION["country"] = $country;
$_SESSION["remark"] = $remark;
$_SESSION["paymentMethod"] = $paymentMethod;
$_SESSION["contactname"] = $contactname;
$_SESSION["phone"] = $phone;
// $_SESSION["qqid"] = $qqid;
// $_SESSION["wechatid"] = $wechatid;
$_SESSION["email"] = $email;
$_SESSION["description"] = $description;
$_SESSION["total_price"] = $total_price;
$j=1;
$totalamount += $_SESSION['member']['shipping_total'];
$totalamount += $_SESSION['member']['tax_total'];
$sql = "UPDATE `order_record` SET `order_no` = '".escapeit($order_no)."', `order_total` = '".escapeit($totalamount)."', `shipping` = '".escapeit($_SESSION['member']['shipping_total'])."' ,`tax` = '".escapeit($_SESSION['member']['tax_total'])."' WHERE `id` = '".escapeit($order_id)."'";
$db->query($sql);
// unset($_SESSION['cart_id']);
// unset($_SESSION["pid"]);
// unset($_SESSION["fav_qty"]);
// unset($_SESSION["hk_price"]);
}
?>
...we are now in processing around 3s...
when you complete the payment, please press 'return to your Email account' and waiting until 'Thank you!' page for holding your products, thanks!
";
}
if ( $_SESSION['lang']=="sc" ) { $templang = "sc/";
echo "付款運行中, 請勿按 ”更新網頁”或 ”返回前一頁”
當完全所有付款步驟後, 按”回到EMAIL版面, 網頁會自動返回本網站的”多謝版面”完成所有情序, 謝謝!
";
}
if ( $_SESSION['lang']=="tc" ) { $templang = "tc/";
echo "付款运行中, 请勿按 ”更新网页”或 ”返回前一页”
当完全所有付款步骤后, 按”回到EMAIL版面, 网页会自动返回本网站的”多谢版面”完成所有情序, 谢谢!
";
echo "
|
img 1 "; echo "img 2 |
![]() "; //echo " |