5
Answers
Vote up!
1
Vote down!

!order-summary email

Hello @ all

i try to get the same email as a customer get's after his order has finished !
so i duplicate the Notification message "Commerce Order: order confirmation"
as "Commerce Order: order confirmation to admin" with small changes in the body!
and duplicate the RULE "COMMERCE ORDER MESSAGE: ORDER NOTIFICATION E-MAIL " I set at "Message notify" the recipient the webstore manager direct with his email adress!
so the point is -he gets the email with some details but the position of the !order-summary will not rendered is empty !!!
what i'm doing wrong ? try around 2 days no solution ?

greets

Asked by: ufuk
on September 23, 2013

Comments

If your order email is not including the order line items, and you are using an external Payment Gateway (ie customer leaves Drupal website to make payment and is then redirected back to Drupal), visit: https://www.drupal.org/node/1895418, in particular see patch at comment 9

- James Johnston on October 11, 2014

5 Answers

Vote up!
5
Vote down!

I found a solution to make !order-summary work in the order notification email to admin :

- cloned the Notification message type to "Commerce Order: order confirmation to admin"
- cloned the checkout rule to "commerce order message: order notification to admin"

Create a new module "commerce_message_custom" (new folder in sites/all/modules) with the function below :

function commerce_message_custom_message_presave($message) {
  if (!empty($message->mid) || $message->type != 'commerce_order_order_confirmation_to_admin') {
    return;
  }

  $message->arguments['!order-summary'] = array(
    'callback' => 'commerce_message_order_summary',
    'pass message' => TRUE,
  );
}

Place the right message type system name (commerce_order_order_confirmation_to_admin) of your message in this code.
With this small module, i get my order summary in the order confirmation message to admin .
Answer by: rico3030
Posted: Feb 4, 2014
Vote up!
0
Vote down!

Are you setting the text format to "commerce order message" when trying to use !order-summary? If you don't do this then that may be why nothing is coming out.

Answer by: Lance Holland
Posted: Nov 4, 2013
Vote up!
0
Vote down!

Hello
I need to send email to admin when Checkout is over.
I did the same than ufuk :
- cloned the Notification message type to "Commerce Order: order confirmation to admin"
- cloned the checkout rule to "commerce order message: order notification to admin"

Neither !order-summary token, nor [message:message-commerce-line-item] token are rendered as in the original notification Email from Commerce Kickstart.
I've tried in Full HTML or Commerce Order Message formats... same result.
I've tried to send them with MimeMail or HTMLmail... same result.

Is !order-summary token refering to the view "Shopping cart summary" ? Do I have to install the Token Embed Views module so this token will work?

I don't want to use commerce_email module.
How can I do to make these token work into this email to Admin?
Thanks for your help!!

Answer by: rico3030
Posted: Feb 3, 2014
Vote up!
0
Vote down!

my solution in this case was to send the admin a email message
"new order "with a token-link to the bill generated with Commerce Order2pdf.
have also the niceness your admin can everytime regenerate the bill in your
views bulk order lists!

with !order-summary i dont found any way ..but I'm a drupal-newbee
hope it helps

Answer by: ufuk
Posted: Feb 4, 2014