Developer forum

Forum » Development » Send translated ordermail

Send translated ordermail


Reply

Hi

We have created a function that checks whether orders are completed and if there is an e-mail send to the customer and to the shop.
We still use Cart V1 and sometimes people close the screen after payment so they do not arrive in step 6 of the ordering process.
To send the shop and these users an e-mail, we call this function occasionally with a request service.

Through the forum I found these useful code for sending the order mail:

Dim MailTemplateCust As Dynamicweb.Templatev2.Template = New Dynamicweb.Templatev2.Template(sMailtemplateCustomer)
If Not order.SendTo(Dynamicweb.Frontend.PageView.Current, sMailSubject, sMailAddressCust, sMailAddressShop, sSenderName, MailTemplateCust) Then
    Dynamicweb.Base.wa("Something went wrong when sending mail to customer")
End If

This works very well, only there is no multilingualism. As an example, when a customer orders in the German language, I want to send in the mail in the German language (as step 6 in the cart would do automatically).

I've made some attempts to translate function:
   MailTemplateCust.Translate ("", "")
   'html As String, path As String

 But I do not manage to translate the mail.

 Does anyone have experience with this?

Gr.
Martijn


Replies

 

You must be logged in to post in the forum