<% DIM readProduct(20) DIM readPrice(20) DIM readQty(20) DIM readDescription(20) DIM addproduct(20) DIM addprice(20) DIM adddescription(20) DIM product(20) DIM price(20) DIM qty(20) DIM description(20) DIM chkvalueform(20) DIM chkvalueqty(20) DIM newvalueproduct(20) DIM newvalueprice(20) DIM newvalueqty(20) DIM newvaluedescription(20) DIM showvalueqty(20) ' for use when add more duplicate product DIM nProduct chkaddqty=0 chksameProduct="not pass else" chkaddProduct="" addmoreProduct="" i2=0 remove=0 newnum=0 addnum=request.querystring("addnum") ' in case user add new item to cart if addnum=1 then selectednum=request.cookies("num") if selectednum="" then ' assign value and create cookies variable selectednum=1 response.cookies("product").haskeys response.cookies("price").haskeys response.cookies("qty").haskeys response.cookies("description").haskeys ' write the 1st time cookies to client machine num=selectednum response.cookies("num")=num addproduct(num)=request.querystring("prod") addprice(num)=request.querystring("pr") adddescription(num)=request.querystring("description") response.cookies("product")(cstr(num))=addproduct(num) response.cookies("price")(cstr(num))=addprice(num) response.cookies("qty")(cstr(num))=1 response.cookies("description")(cstr(num))=adddescription(num) chksameProduct="passed if selectednum='' or selectednum=0" else chkaddProduct=request.querystring("prod") addmoreProduct="true" For nProduct=1 to selectednum chksameProduct=request.cookies("product")(cstr(nProduct)) if chkaddProduct=chksameProduct then chkaddqty=request.cookies("qty")(cstr(nProduct)) chkaddqty=chkaddqty+1 response.cookies("qty")(cstr(nProduct))=chkaddqty addmoreproduct="false" ' tell the program that no more adding the product item num=selectednum ' if no this code, the program willnot show the result end if next if addmoreProduct="true" then ' add new product to the cart selectednum=selectednum+1 if selectednum>20 then selectednum=20 end if num=selectednum response.cookies("num")=num addproduct(num)=request.querystring("prod") addprice(num)=request.querystring("pr") adddescription(num)=request.querystring("description") response.cookies("product")(cstr(num))=addproduct(num) response.cookies("price")(cstr(num))=addprice(num) response.cookies("qty")(cstr(num))=1 response.cookies("description")(cstr(num))=adddescription(num) end if ' of addmoreProduct="true" end if ' of if selectednum="" else ' in case user add nothing to cart but want to see item in the cart selectednum=request.cookies("num") if selectednum="" then response.cookies("num")=0 selectednum=0 else num=selectednum ' if user click 'refresh button' if request.querystring("refresh")="true" then 'check value of quantity chkvalueqty(1)=request.form("shqty1") chkvalueqty(2)=request.form("shqty2") chkvalueqty(3)=request.form("shqty3") chkvalueqty(4)=request.form("shqty4") chkvalueqty(5)=request.form("shqty5") chkvalueqty(6)=request.form("shqty6") chkvalueqty(7)=request.form("shqty7") chkvalueqty(8)=request.form("shqty8") chkvalueqty(9)=request.form("shqty9") chkvalueqty(10)=request.form("shqty10") chkvalueqty(11)=request.form("shqty11") chkvalueqty(12)=request.form("shqty12") chkvalueqty(13)=request.form("shqty13") chkvalueqty(14)=request.form("shqty14") chkvalueqty(15)=request.form("shqty15") chkvalueqty(16)=request.form("shqty16") chkvalueqty(17)=request.form("shqty17") chkvalueqty(18)=request.form("shqty18") chkvalueqty(19)=request.form("shqty19") chkvalueqty(20)=request.form("shqty20") ' pull check item form's value into string for i=1 to num chkvalueform(i)=request.form(cstr(i)) if chkvalueform(i)=1 then newnum=newnum+1 newvalueproduct(newnum)=request.cookies("product")(cstr(i)) newvalueprice(newnum)=request.cookies("price")(cstr(i)) newvalueqty(newnum)=chkvalueqty(i) newvaluedescription(newnum)=request.cookies("description")(cstr(i)) end if next ' reassign the item value in new order for i=1 to newnum response.cookies("product")(cstr(i))=newvalueproduct(i) response.cookies("price")(cstr(i))=newvalueprice(i) response.cookies("qty")(cstr(i))=newvalueqty(i) response.cookies("description")(cstr(i))=newvaluedescription(i) next ' clear unuse value in the rest of item for i=newnum+1 to num response.cookies("product")(cstr(i))="" response.cookies("price")(cstr(i))="" response.cookies("qty")(cstr(i))="" response.cookies("description")(cstr(i))="" newvalueqty(i)="" next ' reassign value back to cookies selectednum=newnum num=newnum response.cookies("num")=num end if ' request.querystring('refresh') end if ' selectednum="" end if 'addnum=1 %> Bangkok Siam





 



Your order

Terms of payment: all order much be pay within 3 day
after customer received reply from us.
<% pg=request.querystring("pg") if mid(pg,1,3)<>"shr" then vpg="javascript: history.back()" else vpg="../"+request.querystring("pg")+".htm" end if %> Back

<% Dim strsubkey Dim strcookie if selectednum=0 then response.write "Your Cart is empty" else response.write "
" &chr(10)&chr(13) response.write " You can remove the product item by uncheck that item then click" &chr(10)&chr(13) response.write "

" &chr(10)&chr(13) response.write "" ' assign unorder cookies' array in to ordered variable's array fisrt for each strsubkey in request.cookies("product") readProduct(strsubkey)=request.cookies("product") (strsubkey) readPrice(strsubkey)=request.cookies("price") (strsubkey) readQty(strsubkey)=request.cookies("qty")(strsubkey) readDescription(strsubkey)=request.cookies("description")(strsubkey) next ' then display product items in ordered for i=1 to num ' column 1st of table response.write "" &chr(10)&chr(13) ' column 2 nd of table response.write "" &chr(10)&chr(13) ' column 3rd of table response.write "" &chr(10)&chr(13) ' column 4th of table response.write "" &chr(10)&chr(13) ' column 5th of table response.write "" & chr(10) & chr(13) next response.write "
" &chr(10)&chr(13) response.write " " &chr(10)&chr(13) response.write "
"+cstr(i)+"
" &chr(10)&chr(13) ' protect the image & label error response.write "" &chr(10)&chr(13) response.write "
" &chr(10)&chr(13) response.write "
" &chr(10)&chr(13) response.write " item no.: "+readProduct(i)+"
" &chr(10)&chr(13) response.write readDescription(i)+"
" &chr(10)&chr(13) response.write "
" &chr(10)&chr(13) ' assign value 1 into newvalueqty(i) if this string is no value inside ' I do this code like this style because I want this script can work with Netscape ' To sending form's value with in Netscape, the form's object should have value specificed inside. 'if (newvalueqty(i)=0) or (newvalueqty(i)="") then ' showvalueqty(i)=1 'else ' showvalueqty(i)=newvalueqty(i) 'end if response.write " Quantity: " &chr(10)&chr(13) response.write "
" response.write "
" ' assign 'showcart.shqty' to 'postorder.qty' this will effect in 'postorder.asp' page response.write ""&chr(10)&chr(13) ' send data to confirm page response.write "
" &chr(10)&chr(13) response.write " " for i=1 to num response.write " " &chr(10)&chr(13) next response.write "
" end if %> <% ' test value zone ' response.write "num="+ cstr(num) +"
" ' response.write "cookies('num')="+request.cookies("num")+"
" ' response.write "addnum="+cstr(addnum)+"
" ' response.write "selectednum="+cstr(selectednum)+"
" 'for i=1 to num ' response.write request.cookies("product")(cstr(i))+" "+cstr(i)+", " +request.cookies("price")(cstr(i))+"
" ' response.write readproduct(i)+" "+cstr(i)+", "+readprice(i)+"
" ' response.write "cookies('qty')"+request.cookies("qty")(cstr(i))+" "+cstr(i)+", "+request.cookies("qty")(cstr(i))+"
" 'next 'response.write "chksameProduct=" + chksameProduct+"
" 'response.write "chkaddProduct=" + chkaddProduct+"
" 'response.write "nProduct="+cstr(nProduct)+"
" 'for i=1 to num ' response.write "ReadProduc"+cstr(i)+"="+readproduct(i)+"
" 'next %>
 
This Web Site was optimized to view best in 800x600 pixels screen with IE or Netscape 4+.