%@ language=JavaScript %> <% Response.AddHeader('P3P',"CP=CAO PSA OUR") var act = new String(Request.Form("act")); var prodNamesArr = new Array("e-Market Norway - 2008 Edition", "e-Market Sweden - 2008 Edition", "", "e-Market Denmark - 2008 Edition"); var prodPricesEUR = new Array(359, 359, 0, 359); var prodPricesGBP = prodPricesEUR; if (act=="add"){ //adding products var now = new Date(); var expDate = new Date(); expDate.setTime(now.getTime()+1000*60*60*24*30);//cookie expires after 1 day Response.Cookies("CartCookieNO").expires = (expDate.getMonth() + 1) + "/" + expDate.getDate() + "/" + expDate.getFullYear(); var prodID = parseInt(new Number(Request.Form("pid"))); Response.Cookies("CartCookieNO")(""+prodID+"") = 1; Response.redirect("panier.asp"); Response.end; } if (act=="rem"){ //removing products var prodID = parseInt(new Number(Request.Form("pid"))); Response.Cookies("CartCookieNO")(""+prodID+"") = 0; Response.redirect("panier.asp"); Response.end; } %>
| |
|||||||
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
|
| |
|||||||
![]() |
<% var prodspresent = false; var strTableCont = new String(); var cartColl = new Enumerator(Request.Cookies("CartCookieNO")); var totalGBP = 0; while (!cartColl.atEnd()) { var x = parseInt(new Number(cartColl.item())); var qty = parseInt(new Number(Request.Cookies("CartCookieNO")(""+x+""))); if (qty==1){ //product is in cart prodspresent = true; strTableCont += " | ||||||
| '+prodNamesArr[x-1]+' | '; strTableCont += ''+prodPricesGBP[x-1]+' | '; strTableCont += 'Slett | '; strTableCont += '|||||
|

