|
-
Sep 6th, 2000, 03:23 PM
#1
Thread Starter
New Member
I've been trying to modify this script to create a textfile and save to a folder on the server instead of sending to an email account but im having no luck doing so. Anyone with any suggestions Please help me Im stumped.
Thanks
Nie!
===========================================================
Function mscsexecute(config, orderform, context, flags)
Dim mscsMessageManager, mscsDataFunctions
Set mscsMessagemanager = context.MessageManager
Set mscsDataFunctions = context.DataFunctions
Dim CDoObject
Dim tempConfig
Dim toEmail
set tempConfig=config
toEmail=tempConfig.toemail
fromEmail=tempConfig.fromEmail
BodyText = "This order has been placed via your Commerce Site." & vbCR & vbCR
BodyText = BodyText & " Tracking # : " & orderform.[order_id] & vbCR & vbCR
For each Item in orderform.items
BodyText = BodyText & "Product Name : " & item.[name] & vbCR
BodyText = BodyText & "Product Price: " & mscsDataFunctions.Money(item.[_oadjust_adjustedprice]) & vbCR
BodyText = BodyText & "Product SKU : " & item.[SKU] & vbCR
BodyText = BodyText & "Quantity : " & item.[Quantity] & vbCR
BodyText = BodyText & vbCR
next
BodyText = BodyText & "Shipping Information" & vbCR
BodyText = BodyText & "--------------------" & vbCR
BodyText = BodyText & " Name: " & orderform.[ship_to_name] & vbCR
BodyText = BodyText & "Address: " & orderform.[ship_to_street] & vbCR
BodyText = BodyText & " City: " & orderform.[ship_to_city] & vbCR
BodyText = BodyText & " State: " & orderform.[ship_to_state] & vbCR
BodyText = BodyText & " Zip: " & orderform.[ship_to_zip] & vbCR
BodyText = BodyText & "Country: " & orderform.[ship_to_country] & vbCR
BodyText = BodyText & " Phone: " & orderform.[ship_to_phone] & vbCR
BodyText = BodyText & " Method: " & orderform.[Shipping_method] & vbCR
BodyText = BodyText & vbCR
BodyText = BodyText & "Billing Information" & vbCR
BodyText = BodyText & "-------------------" & vbCR
BodyText = BodyText & " Name: " & orderform.[bill_to_name] & vbCR
BodyText = BodyText & "Address: " & orderform.[bill_to_street] & vbCR
BodyText = BodyText & " City: " & orderform.[bill_to_city] & vbCR
BodyText = BodyText & " State: " & orderform.[bill_to_state] & vbCR
BodyText = BodyText & " Zip: " & orderform.[bill_to_zip] & vbCR
BodyText = BodyText & "Country: " & orderform.[bill_to_country] & vbCR
BodyText = BodyText & " Phone: " & orderform.[bill_to_phone] & vbCR
BodyText = BodyText & vbCR
BodyText = BodyText & "Credit Card Information" & vbCR
BodyText = BodyText & "-----------------------" & vbCR
BodyText = BodyText & " Name: " & orderform.[cc_name] & vbCR
BodyText = BodyText & " Type: " & orderform.[cc_type] & vbCR
BodyText = BodyText & " Number: " & orderform.[_cc_number] & vbCR
BodyText = BodyText & "ExpDate: " & orderform.[_cc_expmonth] & "/" & orderform.[_cc_expyear] & vbCR
BodyText = BodyText & vbCR
BodyText = BodyText & "Shopper E-mail Address : " & orderform.[_shopper_email] & vbCR
BodyText = BodyText & "Total : " & mscsDataFunctions.Money(CLng(orderform.[_total_total])) & vbCR
BodyText = BodyText & "Shipping Total : " & mscsDataFunctions.Money(orderform.[_shipping_total]) & vbCR
BodyText = BodyText & "Handling Total : " & mscsDataFunctions.Money(orderform.[_handling_total]) & vbCR
BodyText = BodyText & "Tax Total : " & mscsDataFunctions.Money(orderform.[_tax_total]) & vbCR
BodyText = BodyText & "Sub Total : " & mscsDataFunctions.Money(orderform.[_oadjust_subtotal]) & vbCR
if toEmail <> "" then
Set CDoObject=CreateObject("CDONTS.NewMAIL")
CDoObject.From=fromEmail
CDoObject.To=toEmail
CDoObject.Subject="Commerce Site Order"
CDoObject.Body=BodyText
CDoObject.Send
Set CdoObject=nothing
end if
set tempConfig=Nothing
mscsexecute = 1
end function
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|