Mail templates are specified on storefront settings level. They will be applied to all reseller's storefront notifications unless explicitly overridden.
The following templates can be customized in Ecommerce:
Common Template Engine Notes
- DNP uses Ader Template engine to render Activate Service, Suspend Service, Cancel Service, Payment Received and Invoice Summary templates
- If you need to render # (sharp) symbol, for example HTML color value, it should be written as ## (double sharp), because # is reserved symbol in template engine.
- All template engine processing tags ("ad:if", "ad:foreach", etc.) should be well-formed:
- Have closing tag for each corresponding opening tag
- All tag attributes should be surrounded with double quotes.
- All tag names should be written in lower case.
- More information about Ader Template engine can be found at: http://www.adersoftware.com/index.cfm?page=templateEngine2
New Invoice Notification
Set or update “From”, “CC”, “Subject” and both HTML and Plain Text templates and then click “Save” button.
Template Variables
#Customer# - service customer account. It is a <key field>=<field value> dictionary with the following key fields available:
In templates it can be used as following:
Hello, #Customer["FirstName"]#
Your registered e-mail address is: #Customer["Email"]#
#Tax# - invoice tax if applicable. It is a complex structure with the following available fields:
In templates it can be used as following:
#Tax.Description#: #Tax.Amount.ToString("0.00")#
#Invoice# - customer's invoice. It is a complex structure with the following fields available:
-
InvoiceId (int)
-
UserId (int)
-
Username (string)
-
ResellerId (int)
-
Created (DateTime)
-
DueDate (DateTime)
-
InvoiceNumber (string)
-
Total (decimal)
-
SubTotal (decimal)
-
TaxationId (int)
-
TaxAmount (decimal)
-
Currency (string)
-
Paid (bool)
In templates it can be used as following:
Hello, #Invoice.Username#
Your invoice number is: Invoice ## #Invoice.InvoiceId# and total is: #Invoice.Total.ToString("0.00")#
#InvoiceLines# - the collection of invoice items for the invoice. Each item in the collection is a complex structure with the following fields:
-
ItemId (int)
-
InvoiceId (int)
-
ServiceId (int)
-
ItemName (string)
-
TypeName (string)
-
Quantity (int)
-
Total (decimal)
-
SubTotal (decimal)
-
UnitPrice (decimal)
-
Processed (bool)
-
TcoId (string)
In the templates collection can be iterated as following:
You have the following invoice items:
<ad:foreach collection="#InvoiceLines#" var="Line" index="i">
<h2>#Line.ItemName# - #Line.TypeName#</h2>
</ad:foreach>
Payment Received Notification
Set or update “From”, “CC”, “Subject” and both HTML and Plain Text templates and then click “Save” button.
Template Variables
#Customer# - service customer account. It is a <key field>=<field value> dictionary with the following key fields available:
In templates it can be used as following:
Hello, #Customer["FirstName"]#
Your registered e-mail address is: #Customer["Email"]#
#Payment# - customer's payment information. It is a complex structure with the following available fields:
In templates it can be used as following:
Hello, #Payment.Username#,
Your payment transaction id is #Payment.TransactionId#. Please preserve it for future references.
Activate / Suspend / Cancel Service Notification
Set or update “From”, “CC”, “Subject” and both HTML and Plain Text templates and then click “Save” button.
Template Variables
#Customer# - service customer account. It is a <key field>=<field value> dictionary with the following key fields available:
In templates it can be used as following:
Hello, #Customer["FirstName"]#
Your registered e-mail address is: #Customer["Email"]#
#Service# - customer's service. It is a complex structure with the following fields available:
In templates it can be used as following:
Hello, #Service.Username#
Your service #Service.ServiceName # status is #Service.Status.ToString()#