HomeDev GuideAPI Reference
Dev GuideAPI ReferenceUser GuideGitHubNuGetDev CommunitySubmit a ticketLog In
GitHubNuGetDev CommunitySubmit a ticket

Order notifications

Describes the TemplateService (legacy), which lets you generate email notification texts for your site in Optimizely Customized Commerce 13.

The TemplateService uses a provider model (XslTemplateProvider) to let different providers generate the text of custom email. This provider uses XSL to convert an order and an XSL file to a customize formatted message. See Notifications for information about this service and usage examples.

Classes in this topic are available in the Mediachase.Commerce.Engine.Template namespace.

Create a custom message

Use or modify an existing template to create your own. The templates reference a common XSL document, order-shared.xsl, for common elements, like footer and line item formatting. For information about creating XSL and XslTemplateProvider, see Using the XslCompiledTransform Class on MSDN.

Create a message in a different language

Create a new folder in your _Templates_folder. Give the new folder a name that matches the CultureInfo name for the language you want to support with a new message template. Create and save the XSL template in this folder, translated to that language. To use the template, call the TemplateService.Process() method, passing in the name of the template (minus the xsl extension).

Create a template provider

Providers need to be registered in the web.config file. Use the XslTemplateProvider registration in the web.config file as a guide. Each registration must have a name, type, applicationName, and templateSource path. The provider must inherit from TemplateProvider.