Discussions

Custom Checkout Notifications

Hi All. I am trying to setup some custom notifications on checkout so that when a certain product sells, it sends an email to an associated email address that contains the order information, as well as the purchasers name and mailing address.
I have configured a checkout rule that uses system mail to perform this task. This is all working. However, I want to be able to format the output, because the shipping information comes out all on one line with no spaces between (fullnameaddresscitystatepostalcode).
I am currently accessing this information as follows:
[order-fetched:commerce-customer-shipping:commerce_customer_address]
where order-fetched is a referenced entity.
I have tried every permutation of adding name_line, thoroughfare, administrative_area, postal_code that I can think of, but none pull back the values. I really want to keep this configuration in the front end (not have to write code) to keep things simple. Can anyone help with this? It seems like this should definitely be doable.

Posted: Oct 2, 2012

Comments

lmatthews on October 3, 2012

Anyone? I am hoping that someone has done this before and can point me in the right direction. If I have to write code to do this, I guess I will, but I am really just looking for the shortest route to the finish line at this point. Thanks in advance!

lmatthews on October 9, 2012

OK, even though this has been a one sided discussion, I felt I should put the answer to my problem out here in case someone else runs across it, and maybe won't have to struggle as I did.
The answer to my issue was actually very simple. I did not need to pull in the variables by themselves and format the text there. The data was there, just very poorly formatted.
What needs to happen is you need to setup an email template and properly configure the HTML mail module to format the text. Here is a link I used to perform these steps: http://www.frenssen.be/content/sending-html-email-drupal