Voog.com

Ecommerce templates

Ecommerce customer e-mails and invoices can be customized by creating or modifying templates. Liquid markup is used to render the e-mail template contents.

Creating a new template

Customized templates can be viewed, updated or uploaded via the Ecommerce Templates API. Default templates and translations are found in the public repository. These can be used as a base for the customized template. See also example upload script written in Ruby. Ecommerce objects can be used to add extra information to the customer e-mails.
In order to use a customized template, check the following via API:

  • New layout must be enabled
  • Content field must be filled
  • Subject field must be filled

If some fields are not filled, default values are used as fallbacks. E.g. if a template is uploaded with a custom subject but body is left empty, then the custom subject field is used with the default e-mail body.

Adding custom translations

Custom translations can be added to change text in templates while preserving the default translations. Keeping the default translations is useful in case Voog adds or improves the translations, which then you can also use in your templates.

  1. Remove comments from custom_translations.tpl.
  2. Create new translation files for the languages you wish to add custom translations to. Name the file custom_translations_XX.tpl, where XX is the language code.
  3. Follow the format of default translation files, which use JSON format, and add your custom translations.
  4. In the templates, change the templates to use custom translations for every text you added custom translations to.

Example:
Change

{{ translations.ecommerce_core.customer_mailer.payment_notification.heading }}
to
{{ custom_translations.ecommerce_core.customer_mailer.payment_notification.heading }}

The localization filter can be used in ecommerce templates to include system-wide translations.

Previewing a template

Template can be previewed by going to Store > Settings > E-mails tab on your Voog page in admin view.