<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252" %> <% ' *** Edit Operations: declare variables Dim MM_editAction Dim MM_abortEdit Dim MM_editQuery Dim MM_editCmd Dim MM_editConnection Dim MM_editTable Dim MM_editRedirectUrl Dim MM_editColumn Dim MM_recordId Dim MM_fieldsStr Dim MM_columnsStr Dim MM_fields Dim MM_columns Dim MM_typeArray Dim MM_formVal Dim MM_delim Dim MM_altVal Dim MM_emptyVal Dim MM_i MM_editAction = CStr(Request.ServerVariables("SCRIPT_NAME")) If (Request.QueryString <> "") Then MM_editAction = MM_editAction & "?" & Server.HTMLEncode(Request.QueryString) End If ' boolean to abort record edit MM_abortEdit = false ' query string to execute MM_editQuery = "" %> <% ' *** Update Record: set variables If (CStr(Request("MM_update")) = "form1" And CStr(Request("MM_recordId")) <> "") Then MM_editConnection = MM_Connproducts_STRING MM_editTable = "Customer" MM_editColumn = "Customer email" MM_recordId = "'" + Request.Form("MM_recordId") + "'" MM_editRedirectUrl = "" MM_fieldsStr = "Customer_email|value" MM_columnsStr = "[Customer email]|',none,''" ' create the MM_fields and MM_columns arrays MM_fields = Split(MM_fieldsStr, "|") MM_columns = Split(MM_columnsStr, "|") ' set the form values For MM_i = LBound(MM_fields) To UBound(MM_fields) Step 2 MM_fields(MM_i+1) = CStr(Request.Form(MM_fields(MM_i))) Next ' append the query string to the redirect URL If (MM_editRedirectUrl <> "" And Request.QueryString <> "") Then If (InStr(1, MM_editRedirectUrl, "?", vbTextCompare) = 0 And Request.QueryString <> "") Then MM_editRedirectUrl = MM_editRedirectUrl & "?" & Request.QueryString Else MM_editRedirectUrl = MM_editRedirectUrl & "&" & Request.QueryString End If End If End If %> <% ' *** Update Record: construct a sql update statement and execute it If (CStr(Request("MM_update")) <> "" And CStr(Request("MM_recordId")) <> "") Then ' create the sql update statement MM_editQuery = "update " & MM_editTable & " set " For MM_i = LBound(MM_fields) To UBound(MM_fields) Step 2 MM_formVal = MM_fields(MM_i+1) MM_typeArray = Split(MM_columns(MM_i+1),",") MM_delim = MM_typeArray(0) If (MM_delim = "none") Then MM_delim = "" MM_altVal = MM_typeArray(1) If (MM_altVal = "none") Then MM_altVal = "" MM_emptyVal = MM_typeArray(2) If (MM_emptyVal = "none") Then MM_emptyVal = "" If (MM_formVal = "") Then MM_formVal = MM_emptyVal Else If (MM_altVal <> "") Then MM_formVal = MM_altVal ElseIf (MM_delim = "'") Then ' escape quotes MM_formVal = "'" & Replace(MM_formVal,"'","''") & "'" Else MM_formVal = MM_delim + MM_formVal + MM_delim End If End If If (MM_i <> LBound(MM_fields)) Then MM_editQuery = MM_editQuery & "," End If MM_editQuery = MM_editQuery & MM_columns(MM_i) & " = " & MM_formVal Next MM_editQuery = MM_editQuery & " where " & MM_editColumn & " = " & MM_recordId If (Not MM_abortEdit) Then ' execute the update Set MM_editCmd = Server.CreateObject("ADODB.Command") MM_editCmd.ActiveConnection = MM_editConnection MM_editCmd.CommandText = MM_editQuery MM_editCmd.Execute MM_editCmd.ActiveConnection.Close If (MM_editRedirectUrl <> "") Then Response.Redirect(MM_editRedirectUrl) End If End If End If %> <% Dim email Dim email_numRows Set email = Server.CreateObject("ADODB.Recordset") email.ActiveConnection = MM_Connproducts_STRING email.Source = "SELECT * FROM Customer" email.CursorType = 0 email.CursorLocation = 2 email.LockType = 1 email.Open() email_numRows = 0 %> <% ' WA eCart Update if (cStr(Request.Form("Tshirt_Cart_Update_100")) <> "" OR cStr(Request.Form("Tshirt_Cart_Update_100.x")) <> "") then set Tshirt_Cart = Tshirt_Cart_UpdateCart(Tshirt_Cart) Redirect_redirStr=""'_redirStr if (Redirect_redirStr <> "") then Tshirt_Cart_redirStr = Redirect_redirStr end if Tshirt_Cart_cartAction = "Update" end if %> <% ' WA eCart Continue Shopping if (cStr(Request.Form("Tshirt_Cart_Continue_100")) <> "" OR cStr(Request.Form("Tshirt_Cart_Continue_100.x")) <> "") then Redirect_redirStr=""'_redirStr if (true AND cStr(Session("WAEC_ContinueRedirect")) <> "") then Redirect_redirStr=Session("WAEC_ContinueRedirect") end if if (Redirect_redirStr <> "") then Tshirt_Cart_redirStr = Redirect_redirStr end if Tshirt_Cart_cartAction = "Continue" end if %> <% ' WA eCart Clear Cart if (cStr(Request.Form("Tshirt_Cart_Clear_100")) <> "" OR cStr(Request.Form("Tshirt_Cart_Clear_100.x")) <> "") then set Tshirt_Cart = WA_eCart_ClearCart(Tshirt_Cart) Redirect_redirStr=""'_redirStr if (Redirect_redirStr <> "") then Tshirt_Cart_redirStr = Redirect_redirStr end if Tshirt_Cart_cartAction = "ClearCart" end if %> <% 'WA eCart Redirect Check Out if (cStr(Request.Form("Tshirt_Cart_Checkout_1")) <> "" OR cStr(Request.Form("Tshirt_Cart_Checkout_1.x")) <> "") then Redirect_redirStr="checkout.asp"'_redirStr if (Redirect_redirStr <> "") then if (cStr(Request.QueryString()) <> "") then if (InStr(Redirect_redirStr, "?") <= 0) then Redirect_redirStr = Redirect_redirStr & "?" & Request.QueryString() else Redirect_redirStr = Redirect_redirStr & "&" & Request.QueryString() end if end if Tshirt_Cart_redirStr = Redirect_redirStr end if Tshirt_Cart_cartAction = "Checkout" end if %> <% ' WA eCart Redirect if (Tshirt_Cart_redirStr <> "") then Response.Redirect(Tshirt_Cart_redirStr) end if %> Untitled Document

 

 

 

 

Where you wanna be!
What you wanna catch!

 

<% 'WA eCart Show If Start if (NOT WA_eCart_IsEmpty(Tshirt_Cart)) then %>
" method="post" >

Your Shopping Cart

<% while (NOT WA_eCart_EOF(Tshirt_Cart)) %> <% set Tshirt_Cart = WA_eCart_MoveNext(Tshirt_Cart) wend set Tshirt_Cart = WA_eCart_MoveFirst(Tshirt_Cart) %>
Size Color Name Description Price Quantity Remove Total
<%=WA_eCart_DisplayInfo(Tshirt_Cart, "Size")%> <%=WA_eCart_DisplayInfo(Tshirt_Cart, "Color")%> <%=WA_eCart_DisplayInfo(Tshirt_Cart, "Name")%> <%=WA_eCart_DisplayInfo(Tshirt_Cart, "Description")%> <%=WA_eCart_DisplayMoney(Tshirt_Cart, WA_eCart_DisplayInfo(Tshirt_Cart, "Price"))%> " /> " name="Tshirt_Cart_Delete_<%=Tshirt_Cart.DisplayIndex%>" /> <%=WA_eCart_DisplayMoney(Tshirt_Cart, WA_eCart_DisplayInfo(Tshirt_Cart, "TotalPrice"))%>

Order Summary

<% 'WA eCart Merchandizing Show Start 'ecart="Tshirt_Cart" if (WA_eCart_GetDiscounts(Tshirt_Cart) > 0 OR WA_eCart_GetCharges(Tshirt_Cart) > 0 OR WA_eCart_GetShipping(Tshirt_Cart) > 0 OR WA_eCart_GetTax(Tshirt_Cart) > 0) then %> <% 'WA eCart Merchandizing Show End 'ecart="Tshirt_Cart" end if %> <% 'WA eCart Merchandizing Show Start 'ecart="Tshirt_Cart" if (WA_eCart_GetDiscounts(Tshirt_Cart) > 0) then %> <% 'WA eCart Merchandizing Show End 'ecart="Tshirt_Cart" end if %> <% 'WA eCart Merchandizing Show Start 'ecart="Tshirt_Cart" if (WA_eCart_GetCharges(Tshirt_Cart) > 0) then %> <% 'WA eCart Merchandizing Show End 'ecart="Tshirt_Cart" end if %> <% 'WA eCart Merchandizing Show Start 'ecart="Tshirt_Cart" if (WA_eCart_GetShipping(Tshirt_Cart) > 0) then %> <% 'WA eCart Merchandizing Show End 'ecart="Tshirt_Cart" end if %> <% 'WA eCart Merchandizing Show Start 'ecart="Tshirt_Cart" if (WA_eCart_GetTax(Tshirt_Cart) > 0) then %> <% 'WA eCart Merchandizing Show End 'ecart="Tshirt_Cart" end if %>
Sub-total <%=WA_eCart_DisplayMoney(Tshirt_Cart, WA_eCart_TotalColumn(Tshirt_Cart, "TotalPrice"))%>
Discounts -<%=WA_eCart_DisplayMoney(Tshirt_Cart, WA_eCart_GetDiscounts(Tshirt_Cart))%>
Charges <%=WA_eCart_DisplayMoney(Tshirt_Cart, WA_eCart_GetCharges(Tshirt_Cart))%>
Total: <%=WA_eCart_DisplayMoney(Tshirt_Cart, WA_eCart_GrandTotal(Tshirt_Cart))%>
 
<% 'WA eCart Show If Middle else %>
The cart is empty
<% 'WA eCart Show If End end if %>

 

 

Content for id "tmpcell4_1" GoeTotal: <%=WA_eCart_DisplayMoney(Tshirt_Cart, WA_eCart_GrandTotal(Tshirt_Cart))%>EditRegion4s Here

 

<% email.Close() Set email = Nothing %>