<%@Language = "VBScript"%> <% Response.Expires = -1500 %> <% ' This cart was written for Beautiful Ribbons, it has no VAT calculations ' It calculates delivery per order, within bands by region, but UK at default. ' There must be a delivery area called 'United Kingdom' ' Picking up the referring page for 'continue shoppping' Dim myLink IF Request("myLink") = "" THEN myLink = Request.ServerVariables("HTTP_REFERER") ELSE myLink = Request("myLink") END IF %> Your <%=clientPs%> and <%=clientPs2%> Shopping Basket at <%=clientNm%>
Wine Charms and Wedding Favours from Absolutely Charming
Wine Charms and Wedding Favours from Absolutely Charming
 
 
<%=clientPs%>   <%=clientPs2%>
 

Your shopping basket

<% Dim finaltot, vatcost, CountA, Sdatum3, thissesh, count, thistot, thisweight, delcharge, thiscalc, totalweight, firstcharge, surcharge, surcharg2 %> <% Sub grabcustomer IF Request.Cookies("BR") = "" THEN thissesh = "BR" + Session.SessionID extraunique = NOW myMnte = Minute(extraunique) IF Len(myMnte) <2 THEN myMnte = "0" & myMnte END IF mySecs = Second(extraunique) IF Len(mySecs) <2 THEN mySecs = "0" & mySecs END IF myDay = Day(extraunique) IF Len(myDay) <2 THEN myDay = "0" & myDay END IF extraunique = myDay & mySecs & myMnte thissesh = thissesh & extraunique Response.Cookies("BR")= thissesh Response.Cookies("BR").Expires = Date + 30 Response.Cookies("BR").Path = "/" Response.Cookies("BR").Secure = FALSE ELSE thissesh = Request.Cookies("BR") END IF End Sub %> <% Sub bottombuttons %>



You must have session cookies enabled on your computer. Why?
     
<% End sub %> <% Dim sAction sAction = CStr(Request("action")) Select Case sAction %> <% Case "view" grabcustomer ' Get the shopping cart sqlString = "SELECT c_id, c_prodID, prod_pn, c_pp, prod_ID, c_pq, c_colour, prod_name FROM Cart, Productz WHERE c_userID = '" & thissesh & "' AND c_prodID = prod_ID ORDER BY prod_name ASC" SET RS = adoConn.Execute( sqlString ) %> <% count = 0 thistot = 0 RS.MoveFirst Do While Not RS.EOF subtot = Cdbl(RS.Fields("c_pp")) * RS.Fields("c_pq") %> <% thistot = thistot + subtot subtot = 0 count = count + 1 RS.MoveNext Loop %> <% 'Get UK delivery charge, and free order capping sqlString = "SELECT * FROM Deliveryz WHERE d_area = '" & defaultDeliveryArea & "'" SET rsDel = adoConn.Execute( sqlString ) 'calculate the default countries delivery charge delfigz = thistot IF delfigz <= Cdbl(pbandA) THEN delcharge = rsDel.Fields("d_price1") END IF IF delfigz > Cdbl(pbandA) AND delfigz <= Cdbl(pbandB) THEN delcharge = rsDel.Fields("d_price2") END IF IF delfigz > Cdbl(pbandB) THEN delcharge = rsDel.Fields("d_price3") END IF delfigz = Cdbl(delfigz) rsDel.Close Set rsDel = Nothing %>
           
Part Number: Product: Option: Price Each: Quantity:
Subtotal:
<%= RS.Fields("prod_pn") %> <%= RS.Fields("prod_name") %> <% IF RS.Fields("c_colour") = "" THEN Response.Write "n/a" ELSE Response.Write RS.Fields("c_colour") END IF %> £<%= RS.Fields("c_pp") %>
"> "> " size="5">
£<%= FormatNumber(subtot) %>
        Goods Total:
<% Response.Write "£" & FormatNumber(thistot) & ""%>
        UK Delivery**
<% IF thistot = "" OR thistot = 0 THEN delcharge = 0 finaltot = thistot Response.Write "N/A" ELSE IF delcharge = "" OR delcharge = 0 THEN Response.Write "FREE" finaltot = thistot ELSE Response.Write "£" & FormatNumber(delcharge) & "" finaltot = thistot + delcharge END IF END IF %>
        Order Total:
<% Response.Write "£" & FormatNumber(finaltot) & ""%>
<% IF count <1 THEN response.write "" response.write "

Your basket is currently empty!

" END IF RS.Close Set RS = Nothing %> <% bottombuttons %>
 

** Delivery charges, for orders outside the UK will be recalculated on checkout.

Check Your Delivery Charges

Returns and Refunds.

<% Case "update" grabcustomer pid = Request("pid") pq = Request("pq") pcol = Request("pcol") myLink = Request("myLink") IF Request("pq") = "" THEN pq = 0 Else pq = Request("pq") END IF IF pq = 0 THEN IF pcol <> "" THEN mySQL = "DELETE FROM Cart WHERE c_prodID = '" & pid & "' AND c_userID = '" & thissesh & "' AND c_colour = '" & pcol & "'" ELSE mySQL = "DELETE FROM Cart WHERE c_prodID = '" & pid & "' AND c_userID = '" & thissesh & "'" END IF ELSE mySQL = "UPDATE Cart SET c_pq = '" & pq & "' WHERE c_prodID = '" & pid & "' AND c_userID = '" & thissesh & "'" END IF adoConn.Execute(mySQL) Response.Status = "302 Object moved" Response.Redirect "cart.asp?action=view&myLink=" & myLink %> <% Case "add" grabcustomer Dim pq, pp pid = Request("pid") pq = Request("pq") pcol = Request("pcol") pcol = LCASE(pcol) IF Request("pq") ="" OR Request("pq") ="0" THEN Response.Write "

You'll need to enter the quantity you require.

You can remove an item from your shopping basket by entering 0 on the View Basket page.

" ELSE sqlString = "SELECT prod_ID, prod_price, prod_pn, prod_name FROM Productz WHERE prod_ID = '" & pid & "'" SET RS2 = adoConn.Execute( sqlString ) pp = RS2.Fields("prod_price") ppn = RS2.Fields("prod_pn") pname = RS2.Fields("prod_name") IF pid <> "" AND pq <> "" THEN sqlString = "SELECT * FROM Cart WHERE c_userID= '" & thissesh & "' AND c_prodID ='" & pid & "' AND c_colour = '" & pcol & "'" SET RS = adoConn.Execute( sqlString ) IF RS.EOF THEN sqlString = "INSERT INTO Cart VALUES ('','" & pid & "','" & pp & "','" & pq & "','" & thissesh & "','" & ppn & "','" & pname & "', '" & pcol & "')" ELSE ' pq = pq + RS.Fields("c_pq") thisOne = RS.Fields("c_id") sqlString = "UPDATE Cart SET c_pq = c_pq + '" & pq & "' WHERE c_id = '" & thisOne & "'" END IF END IF RS.Close RS2.Close SET RS = Nothing SET RS2 = Nothing adoConn.Execute sqlString Response.Status = "302 Object moved" Response.Redirect "cart.asp?action=view&myLink=" & myLink END IF %> <% Case "empty" grabcustomer myLink = Request("myLink") mySQL = "DELETE FROM Cart WHERE c_userID = '" & thissesh & "'" adoConn.Execute(mySQL) Response.Status = "302 Object moved" Response.Redirect "cart.asp?action=view&myLink=" & myLink %> <% Case Else ' menu Response.Status = "302 Object moved" Response.Redirect "cart.asp?action=view&myLink=" & myLink %> <% End Select %>
<%=clientName%>   <%=clientPs%> for sale online
 
 
Wine Charms & Jewellery
<% adoConn.Close Set adoConn = Nothing Set strCon = Nothing %>