VTEX Emails is an email framework for developing transactional email templates for VTEX E-commerces.
This is a improved version of VTEX Emails which we can use to make multi languages e-mails.
Folder | Description |
---|---|
public |
compiled files used to preview with localhost:8000 |
dist |
compiled files - copy and paste inside message center template |
source |
working folder |
Source folder | Description |
---|---|
data |
JSON files containing Orders data |
helpers |
VTEX's Helpers functions |
locales |
i18n files |
merge-templates |
Builder used to combine multiple languages into a single file |
sass |
styles folder |
templates |
e-mails templates |
Inside Sass folder you can see a
custom.scss
file which is used to put custom styles of templates
One of master pieces of this automation are the merge templates.
Each template have your merge-template file.
Example:
Template: 01-confirmed.hbs
Merge Template: 01-confirmed.merge.hbs
Tip: All of merge templates have a merge before the extension file.
You will see something like this:
Templates folder | Description |
---|---|
partials |
E-mails parts |
partials > main |
E-mails header and footer content |
helpers
you can use only Handlebars and VTEX's Helpers
- Download or clone this repo
- Install npm dependencies: run
npm install
oryarn install
- Requires node
16.x
- Run
npm run gulp dev
oryarn gulp dev
- Go to http://localhost:8000/
- Choose
finals
folder and open the template that you want to preview
- Run
npm run gulp dist
oryarn gulp dist
- Go to
dist
folder - Go to
finals
folder - Copy the template content and paste it in VTEX Message Center
- Run
npm run gulp preview
oryarn gulp preview
- Go to
public
folder, copy the template content and test it using services like MailChimp
Improved with 💗 by Patryck Gratão