<% ' Begin A Transaction UpdateUser Con.BeginTrans ' Retrieve Registration Information sqlString = "SELECT * FROM users " &_ "WHERE user_id=" & userID SET RS = Con.Execute( sqlString ) IF NOT RS.EOF THEN username = RS( "user_username" ) firstname = RS( "user_firstname" ) lastname = RS( "user_lastname" ) email = RS( "user_email" ) street = RS( "user_street" ) street2 = RS( "user_street2" ) city = RS( "user_city" ) state = RS( "user_state" ) zip = RS( "user_zip" ) country = RS( "user_country" ) cctype = RS( "user_cctype" ) END IF ' Transfer cart to orders table ' Define Constants CONST CARTPID = 0 CONST CARTPUSERID = 1 CONST CARTPNAME = 2 CONST CARTPPRICE = 3 CONST CARTPQUANTITY = 4 ' Check the Shopping Cart localCart = Session( "cart" ) IF localCart( CARTPID, 0 ) = "" THEN MessageText = "Sorry your Shopping Cart Expired - Please Choose your Cart again" ELSE MessageText = "Thanks for placing your order" END IF if Session( "selected_currency" ) = "" then Cooky_Currency = Request.Cookies( "UserCurrency" ) if Cooky_Currency = "" then SelCurrency = "USD" else SelCurrency = Cooky_Currency end if Session( "selected_currency" ) = SelCurrency else SelCurrency = Session( "selected_currency" ) end if PurchaseCurrency = SelCurrency %> Order Placed <%IF session( "iDebugLevel" ) > 1 THEN %> Session Debug Level Set to:<%=session( "iDebugLevel" )%>
doCheckout2.asp UserID: <%=userID%>
Check CC_Type: <%=cctype%>
<%END IF sqlString = "INSERT INTO ship ( " &_ "ship_userID, " &_ "ship_created, " &_ "ship_paymethod, " &_ "ship_payment, " &_ "ship_status, " &_ "ship_currency " &_ ") VALUES ( " &_ " " & userID & ", " &_ "'" & NOW() & "', " &_ "'" & cctype & "', " &_ " 0 , " &_ " 99 , " &_ "'" & PurchaseCurrency & "')" IF session( "iDebugLevel" ) > 0 THEN %> Session Debug Level Set to:<%=session( "iDebugLevel" )%>
sqlString: <%=sqlstring%> <%END IF Con.Execute sqlString sqlString = "SELECT * " &_ "FROM ship " &_ "WHERE ship_status = 99 " &_ "AND ship_userID = " & userID & " " &_ "ORDER BY ship_userID DESC" IF session( "iDebugLevel" ) > 0 THEN %> Session Debug Level Set to:<%=session( "iDebugLevel" )%>
sqlString: <%=sqlstring%> <%END IF SET RS = Server.CreateObject( "ADODB.Recordset" ) RS.CursorType = adOpenStatic RS.ActiveConnection = Con RS.Open sqlString OrderShip_ShipID = RS( "ship_shipID" ) IF session( "iDebugLevel" ) > 0 THEN %> Session Debug Level Set to:<%=session( "iDebugLevel" )%>
Shipment ID: <%=RS( "ship_shipID" )%> <%END IF shipcharge = CalculateShipping( PurchaseCurrency, LocalCart ) order_total = 0 FOR i = 0 TO UBOUND( localCart, 2 ) IF LocalCart( CARTPID, i ) <> "" THEN sqlString = "INSERT INTO orders ( " &_ "order_productID, " &_ "order_userID, " &_ "order_shipID, " &_ "order_quantity, " &_ "order_price, " &_ "order_entrydate " &_ ") VALUES ( " &_ " " & localCart( CARTPID, i ) & ", " &_ " " & userID & ", " &_ " " & RS( "ship_shipID" ) & ", " &_ " " & localCart( CARTPQUANTITY, i ) & ", " &_ " " & localCart( CARTPPRICE, i ) & ", " &_ "' " & NOW() & "' )" IF session( "iDebugLevel" ) > 0 THEN %> Session Debug Level Set to:<%=session( "iDebugLevel" )%>
sqlString: <%=sqlstring%> <%END IF Con.Execute sqlString order_total = order_total + (localCart( CARTPPRICE, i ) * localCart( CARTPQUANTITY, i )) ELSE EXIT FOR END IF NEXT 'Calculate GST if Country is "Australia" if country = "AUSTRALIA" or country = "Australia" or country = "australia" or country = "AU" or country = "au" then shipgst = (order_total + shipcharge) * 0.1 else shipgst = 0 end if GrandTotal = order_total + shipcharge %> <% ' Empty shopping cart FOR i = 0 TO UBOUND( localCart, 2 ) IF localCart( CARTPID, i ) <> "" THEN localCart( CARTPID, i ) = "" localCart( CARTPUSERID, i ) = "" localCart( CARTPNAME, i ) = "" localCart( CARTPPRICE, i ) = "" localCart( CARTPQUANTITY, i ) = "" ELSE EXIT FOR END IF NEXT ' Clear Session variable with Array Session( "cart" ) = localCart ' Update Shipping Charge sqlString = "UPDATE ship " &_ "SET ship_charge = " & shipcharge & " , " &_ "ship_GST = " & shipgst & " , " &_ " ship_status = 1 " &_ "WHERE ship_shipID = " & RS( "ship_shipID" ) IF session( "iDebugLevel" ) > 0 THEN %> Session Debug Level Set to:<%=session( "iDebugLevel" )%>
sqlString: <%=sqlstring%>
<%END IF Con.Execute sqlString ' End the transaction Con.CommitTrans %>

Invoice Summary

Total Goods <%=PurchaseCurrency & FormatCurrency(order_total)%> 
Shipping <%=PurchaseCurrency & FormatCurrency(shipcharge)%> 
GST  (included in total) * <%=PurchaseCurrency & FormatCurrency(shipgst)%> 
Payment Total <%=PurchaseCurrency & FormatCurrency(GrandTotal)%> 

<%if shipgst > 0 then %> * - Total is GST inclusive

<%end if %> You can track the status of your order at any time by clicking 

Order Status on the Side Bar

<% IF cctype = "Check" THEN %>

<%ELSE%>

  Hit continue to make payment  


> > > > > <%If cctype = "Credit" then %>

For Credit Card payment select

"If you do not currently have a PayPal account"

After selection Continue - You will then be able to enter
 credit card detail without a PayPal account
<%End If%>

<%END IF%>