End
//<--Start--添加商品至购物车的函数,参数(商品编号,商品名称,商品数量,商品单价)
function SetOrderForm(item_no,item_name,item_price)
{
var cookieString=document.cookie;
if (cookieString.length>=4000)
{
alert("The product quantity is full\nPlease add new products after finishing this order operation!");
}
// else if(item_amount.indexOf('.')!=-1)
// {
// alert("数量输入错误!");
// }
else
{
var mer_list=ReadOrderForm('24_OrderForm');
var Then = new Date();
Then.setTime(Then.getTime()+24*60*60*1000);
var item_detail="|"+item_no+"&"+item_name+"&"+item_price;
if(mer_list==false)
{
document.cookie="24_OrderForm="+escape(item_detail)+";expires=" + Then.toGMTString()+";path=/";
//alert("“"+item_name+"”\n"+"已经加入您的订单!");
}
else
{
if (mer_list.indexOf(escape(item_no))!=-1)
{
//alert('This product has been added !')
alert("", "This product has been added !", function() {
//after click the confirm button, will run this callback function
}, {
//type: 'success',
confirmButtonText: 'OK'
});
}
else
{
document.cookie="24_OrderForm="+mer_list+escape(item_detail)+";expires=" + Then.toGMTString()+";path=/";
//alert("“"+item_name+"”\n"+"This product has been added!");
// var x = document.cookie;
// alert(x);
}
}
}
}
//-->End
//<--Start--修改数量后,更新cookie的函数
function updateOrderCookie()
{
var rowscount=document.getElementById("test").rows.length;
var item_detail="";
for(var i=1;i<=(parseInt(rowscount)-1);i++)
{
item_detail+="|"+document.getElementById("test").rows(i).cells(0).innerText+"&"+document.getElementById("test").rows(i).cells(0).innerText+"&"+document.getElementById("test").rows(i).cells(1).innerText+"&"+document.getElementById("Num"+i).value;
// document.write(document.getElementById("test").rows(i).cells(1).innerText);
}
var Then = new Date();
Then.setTime(Then.getTime()+24*30*60*1000);
document.cookie="24_OrderForm="+escape(item_detail)+";expires=" + Then.toGMTString()+";path=/";
}
//<--End--订单更新
//<--清空购物车
function clearOrder()
{
var Then = new Date();
document.cookie="24_OrderForm='';expires=" + Then.toGMTString()+";path=/";
}
-->
HYUNDAI 3111025000, 31110-25000, 311100A100, 3111025600DS Electric Fuel Pump