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.scssfile 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 |
helpersyou can use only Handlebars and VTEX's Helpers
- Download or clone this repo
- Install npm dependencies: run
npm installoryarn install
- Requires node
16.x - Run
npm run gulp devoryarn gulp dev - Go to http://localhost:8000/
- Choose
finalsfolder and open the template that you want to preview
- Run
npm run gulp distoryarn gulp dist - Go to
distfolder - Go to
finalsfolder - Copy the template content and paste it in VTEX Message Center
- Run
npm run gulp previeworyarn gulp preview - Go to
publicfolder, copy the template content and test it using services like MailChimp
Improved with 💗 by Patryck Gratão