在4.0中,在后台发货的时候,只会发一个通知邮件,告诉购买人,已经发货,但是购买人更本就看不到快递公司和快递单号,这样非常不方便,所以本人针对这点进行修改,在KS.ShopOrder文件中:
'发货操作
Sub DoDeliverGoods()
Dim ID:ID=KS.G("ID")
Dim DeliverDate:DeliverDate=KS.G("DeliverDate")
Dim ExpressCompany:ExpressCompany=KS.G("ExpressCompany")
Dim ExpressNumber:ExpressNumber=KS.G("ExpressNumber")
Dim HandlerName:HandlerName=KS.G("HandlerName")
Dim Remark:Remark=KS.G("Remark")
Dim SendMessageToUser:SendMessageToUser=KS.ChkClng(KS.G("SendMessageToUser"))
Dim SendMailToUser:SendMailToUser=KS.ChkClng(KS.G("SendMailToUser"))
If Not IsDate(DeliverDate) Then Response.Write "<script>alert('发货日期格式有误');history.back();</script>":response.end
If (HandlerName="") Then Response.Write "<script>alert('经手人必须填写');history.back();</script>":response.end
If (ExpressCompany="") Then Response.Write "<script>alert('快递公司必须填写');history.back();</script>":response.end
Dim RS:Set RS=Server.CreateObject("ADODB.RECORDSET")
RS.Open "Select * From KS_Order Where ID=" & ID,Conn,1,3
If RS.Eof Then
rs.close:set rs=nothing
Response.Write "<script>alert('参数错误!');history.back();</script>"
Exit Sub :Response.end
end if
If rs("DeliverStatus")=1 Then Response.Write "<script>alert('此订单已经发过货!');history.back();</script>":Response.end
rs("DeliverStatus")=1
rs.update
Dim Email:Email=RS("Email")
Dim ContactMan:ContactMan=rs("Contactman")
Dim RSLog:Set RSLog=Server.CreateObject("ADODB.RECORDSET")
RSLog.Open "Select * From KS_LogDeliver",Conn,1,3
RSLog.AddNew
RSLog("OrderID")=RS("OrderID")
RSLog("UserName")=RS("UserName")
RSLog("ClientName")=RS("ContactMan")
RSLog("Inputer")=KS.C("AdminName")
RSLog("HandlerName")=HandlerName
RSLog("DeliverDate")=DeliverDate
RSLog("DeliverType")=1 '发货
RSLog("Remark")=Remark
RSLog("ExpressCompany")=ExpressCompany
RSLog("ExpressNumber")=ExpressNumber
RSLog("Status")=0
RSLog.Update
RSLog.Close:Set RSLog=Nothing
If SendMessageToUser=1 and trim(rs("UserName"))<>"游客" Then
'参数Incept--接收者,Sender-发送者,title--主题,Content--信件内容
Call KS.SendInfo(rs("username"),KS.C("AdminName"),"发货通知",ReplaceOrderLabel(KS.Setting(77),rs))
End If
If SendMailToUser=1 and Email<>"" Then
Dim ReturnInfo:ReturnInfo=KS.SendMail(KS.Setting(12), KS.Setting(13), KS.Setting(14), "发货通知", Email,ContactMan, ReplaceOrderLabel(KS.Setting(77),rs),KS.Setting(11))
End If
%>
红色的地方就是快递公司和发货单号,蓝色那段是邮件和短消息通知代码,因为我对代码并不是特别精通,所以不知道如何在邮件内容中加上快递公司和发货单号,不知道哪位懂代码的,帮忙指点一下,如何修改?