<% 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 %>
<% For UCCart1__i=0 To UCCart1.GetItemCount()-1 %> <% Next 'UCCart1__i %>
Code Name Size Colour Price Quantity Totals
<%=(UCCart1.GetColumnValue("ProductID",UCCart1__i))%> <%=(UCCart1.GetColumnValue("Name",UCCart1__i))%> <%=(UCCart1.GetColumnValue("Size",UCCart1__i))%> <%=(UCCart1.GetColumnValue("Colour",UCCart1__i))%> <%=(UCCart1.GetColumnValue("Price",UCCart1__i))%> " class="input2"> <%=FormatNumber(UCCart1.GetColumnValue("Total",UCCart1__i), -1, -2, -2, -2)%>
Sub Total: 
<%=FormatNumber(UCCart1.GetColumnTotal("Total"), -1, -2, -2, -2)%>
Delivery: 
<%=FormatNumber((delivery), -1, -2, -2, -2)%>
Grand Total: 
<%=FormatNumber((grandtotal), -1, -2, -2, -2)%>
 
Item Quantities
You can update the quantity of an item, by entering the number you require in the quantity text box above and clicking the 'Update Item Quantities' button below.

To Remove an Item:
Enter a 0 into the quantity text box above and then click the button below.

 

Continue Shopping | Empty Cart | Go To Checkout