Download and edit email templates

Changes you make to your store through the Commerce administration interface do not affect the email templates. If you make changes to your store that you want to see reflected in emails you send to customers, you must manually update the templates.

Examples of changes you might want to reflect in your email templates are as follows:

  • If you change a theme’s style sheet on the Design page and you want your emails to have the same look and feel, you must manually update each email’s style sheet in its template.
  • If you change the Tax Processing settings to remove the tax summary line from your store’s cart, checkout, and order summary pages, you must manually update the templates to remove the tax summary line from emails that contain order summaries. (See Customize tax display in templates for more information.)

Each email template package you download includes the following files:

File Description
locales/<langcode>/Strings.xlf

Contains localized strings for the locale specified by <langcode>.

For example, the Spanish strings are located in the file

locales/es/Strings.xlf.

You can edit text inside the <source> tags.

html_body.ftl FreeMarker template file that configures the HTML body of the email.
text_body.ftl FreeMarker template file that configures the plain text body of the email. This file is included only in the package for the Forgotten Password and New Account emails.
Readme.txt A help file that describes the fields that you can reference in the templates.
subject.ftl FreeMarker template file that configures the subject line of the email.

To download an email template package:

  1. Click Settings.
  2. Select Email Settings.
  3. If you run multiple sites from a single Commerce instance, select the site whose email templates you want to download.
  4. Click the type of email whose template you want to download.
  5. Under Content, click Download Current Template.
  6. Specify whether to open the ZIP file or save it.

Once you have made changes to the template files, compress them into a ZIP file and upload it. Make sure the ZIP file has the same name as the one you downloaded and contains the following files:

  • locales/<langcode>/Strings.xlf
  • html_body.ftl for HTML-based email messages or text_body.ftl for plain text email messages.
  • subject.ftl

To upload an email template:

  1. Click Settings.
  2. Select Email Settings.
  3. If you run multiple sites from a single Commerce instance, select the site whose email templates you want to download.
  4. Click the type of email whose template you want to upload.
  5. Under Content, click Upload New Templates.
  6. Locate the ZIP file to upload and then click Open.

    When the upload is complete, Commerce displays a success message. This update takes effect immediately and does not require publishing.