<%@ LANGUAGE="VBSCRIPT" %> <% PageStrings = "1068, 1069" strThisBackPage = "orders" %> <% '=============================================== ' CactuShop ASP Shopping Cart ' ©1999-2004 Cactusoft Ltd. www.cactusoft.com '=============================================== ' All rights reserved. ' Use of this code is covered by the terms and ' conditions in the license agreement. No ' unauthorized duplication or distribution is ' permitted. Cactusoft's copyright notices must ' remain in the ASP sections of the code. '=============================================== '----------------------------------------------- 'UPDATE ORDER STATUS FIELDS 'The site owner can add comments on the progress 'of the order and indicate whether it should be 'marked as dealt with. '----------------------------------------------- strCallmode = request.form("strCallmode") ON_ID = request.form("ON_ID") If strCallmode = "Delete" then '----------------------------------------------- 'DELETE QUERY '----------------------------------------------- strQuery = strDeleteStatementSyntax & " tblCactuShopInvoiceRows WHERE IR_OrderNumber = " & ON_ID Call ExecuteSQL(strQuery, numCursorType, objRecordSet) strQuery = strDeleteStatementSyntax & " tblCactuShopOrderNumbers WHERE ON_ID = " & ON_ID Else '----------------------------------------------- 'UPDATE QUERY '----------------------------------------------- ON_Status = left(request.form("ON_Status"), Application(LICENSENUMBER &"ON_Status_AL")) ON_Sent = request.form("ON_Sent") ON_Invoiced = request.form("ON_Invoiced") ON_Shipped = request.form("ON_Shipped") ON_Paid = request.form("ON_Paid") If ON_Sent<>"y" then ON_Sent="n" If ON_Invoiced<>"y" then ON_Invoiced="n" If ON_Shipped<>"y" then ON_Shipped="n" If ON_Paid<>"y" then ON_Paid="n" strQuery = "UPDATE tblCactuShopOrderNumbers SET ON_LastModified=" & strDateDelimiter & ReverseFormatYear(now()) & strDateDelimiter & ", " &_ "ON_Status='" & SqlSafe(ON_Status) & "', " &_ "ON_Sent='" & ON_Sent & "', " &_ "ON_Invoiced='" & ON_Invoiced & "', " &_ "ON_Shipped='" & ON_Shipped & "', " &_ "ON_Paid='" & ON_Paid & "' WHERE ON_ID=" & ON_ID '----------------------------------------------- 'SEND EMAIL TO CUSTOMER 'If they wanted one... '----------------------------------------------- If request.form("sendorderupdateemail") = "y" then CD_EmailAddress = request.Form("CD_EmailAddress") strBodyText = GetString("EmailText_OrderStatusUpdated") & vbcrlf & vbcrlf & Application(LICENSENUMBER & "webshopURL") & "customer_vieworder.asp?ON_ID=" & ON_ID strSubjectLine = GetString("EmailText_OrderUpdateFrom") & " " & GetString("Config_Webshopname") Call SendEMail(Application(LICENSENUMBER & "emailmethod"), Application(LICENSENUMBER & "mailserver"), CD_EmailAddress, "", "", strEmailFrom, strEmailFrom,strEmailFrom, strEmailFrom, strSubjectLine, strBodyText, "", false) end if End If Call ExecuteSQL(strQuery, numCursorType, objRecordSet) Response.Redirect("_orders_list.asp?datValue1=" & request.Form("datValue1") & "&strCallMode=" & request.Form("strCallMode") & "&CD_EmailAddress=" & request.Form("CD_EmailAddress2") & "&CP_CouponCode=" & request.Form("CP_CouponCode") & "&AFP_ID=" & request.Form("AFP_ID")) %>