Last updated October 23, 2012. Created by ibot on March 7, 2012.
Edited by MrPeanut, s1l. Log in to edit this page.
Commerce Email Documentation
This is the documentation page for the Commerce Email module.
Dependencies
The 2.x version is still not completely stable, but it should work if you have:
Please make sure you have those modules in their required versions and it should work...
(derived from http://drupal.org/node/1433822#comment-5579468 )
Basic installation and usage guide
- Download the latest 7.x-2.x version of Commerce Email
- Download the latest variable-7.x-1.x-dev
- Download rules, variable_email, entity, htmlmail, mailsystem, token
- Enable commerce_email
- Go to
admin/commerce/config/emailand configure your emails (it has Token support, so enable Token) - Ensure the default email Rules are disabled so you don't send out emails twice (these are
commerce_checkout_new_accountandcommerce_checkout_order_email).
(So you won't run into #1451680: Notice: Undefined index: module en variable_type_include())
The templating process
2.x uses HtmlMail to handle the theming part, so you'll have to create a template for HtmlMail.
With Commerce Email, it seems like the workflow looks like this :
- Commerce Email declares a new token that contains the themed order content information,
- Commerce Email uses Variable Email and Rules to send the email
- The Mail System module is used to define the mail processor (HtmlMail) to be used for Variable Email.
So at the end : when an order is completed for instance, Rules triggers the "Send a Variable Email" action, which has the order content token, and the email text in a variable (set in admin/commerce/config/email) - Since Variable Email is set to use HtmlMail mail processor, it themes the email with the default theme provided by HtmlMail.
If you want to create a specific template for your email, you'll have to do something like this :
- Create a template email in your theme used for your email (See admin/config/system/htmlmail) with the following template name : htmlmail--variable_email--EMAIL_KEY.tpl.php where EMAIL_KEY is the variable name used (try htmlmail--variable_email--commerce_email_order.tpl.php for the default one).
For more help on the template name suggestion system of HtmlMail, go to admin/config/system/htmlmail and check "debug" checkbox, send an email and you'll see what should be your EMAIL_KEY.
(from http://drupal.org/node/1436428#comment-5653506)
Comments
At this point if you are
At this point if you are using the latest then I think you are okay. The comment made about Variable DEV was posted on February 9th and the latest is as of January 2013 :)