Upon order completion there is a rule that sends out an email. There are some order specific variables listed under Replacement Patterns that you can add to the email body. Such as [order:order-id]. I need to add in other order details not listed in the Replacement Patters. Such as line items, Billing Name, etc. Is this possible?
Can anyone help me?
I see that the fields that are there are there because of modules/order/commerce_order.tokens.inc but I can figure out how to add in these others.
Thank you!
Comments
Comment #1
maestrojed commentedI case someone else is looking to do this, I was about to accomplish this with the php filter and using $order, commerce_customer_profile_load(), commerce_line_item_load_multiple(), and commerce_line_item_title().
But I do believe this data should be tokens that appear as replacement patterns.
Jed
Comment #2
switch13 commentedI am looking to do this as well. In particular the line items. subscribe
Comment #3
gioris commented+1
Comment #4
amfis commentedThere is a sandbox module: http://drupal.org/sandbox/paul.linney/1252292
With this I was able to craft my custom order email using theme template from this module.
Comment #5
vasikesubscribe. i also think there should be a better support for the notifications capabilities.
what about payment for this?
Comment #6
loko commentedMaybe this help you http://drupal.org/project/commerce_email
Comment #7
kpv commentedthx maestrojed
Comment #8
cameron prince commentedYou can create your own replacement patterns using the following example code. Note that $order contains all the order data. Use the devel module's dpm() to view the contents of $order and then format and return the data as desired.
Comment #9
bojanz commentedCommerce Message now provides a powerful solution.
Comment #11
Marko B commentedThink bojanz was aiming at https://www.drupal.org/project/commerce_email not commerce message.
Comment #12
bojanz commentedNo, I wasn't.
Comment #13
Marko B commentedyes sorry, just looked more into messages and I guess you were aiming at summary part of that module. So there are more ways to tackle this problem.
I apologize :)