% UC_CartColNames=Array("ProductID","Quantity","Name","Size","Colour","Price","Total") UC_ComputedCols=Array("","","","","","","Price") set UCCart1=VBConstuctCart("UCCart",0,UC_CartColNames,UC_ComputedCols) UCCart1__i=0 %> <% UC_updateAction = CStr(Request("URL")) If (Request.QueryString <> "") Then UC_updateAction = UC_updateAction & "?" & Request.QueryString End If If (Request.Form("quantity").Count > 0) Then UCCart1.Update("quantity") If ("cart.asp" <> "") Then Response.Redirect("cart.asp") End If End If %> <% UC_EmptyCart = CStr(Request.ServerVariables("URL")) & "?UC_EmptyCart=1" If (CStr(Request("UC_EmptyCart")) = "1") Then UCCart1.Destroy() UC_redirectPage = "cart_empty.asp" ' redirect with URL parameters (remove the "UC_EmptyCart" query param). if (UC_redirectPage = "") Then UC_redirectPage = CStr(Request.ServerVariables("URL")) If (InStr(1, UC_redirectPage, "?", vbTextCompare) = 0 And Request.QueryString <> "") Then newQS = "?" For Each Item In Request.QueryString If (Item <> "UC_EmptyCart") Then If (Len(newQS) > 1) Then newQS = newQS & "&" newQS = newQS & Item & "=" & Server.URLencode(Request.QueryString(Item)) End If Next if (Len(newQS) > 1) Then UC_redirectPage = UC_redirectPage & newQS End If Response.Redirect(UC_redirectPage) End If %> <% If UCCart1.GetItemCount() <= 0 Then Response.Redirect("cart_empty.asp") %> <% ' Business rules are coded here. delivery = CSng(0.00) vat = 0.00 grandtotal = CCur(UCCart1.GetColumnTotal("Total")) + delivery + vat %>