3

Is there any way of allowing site admins to resend the default order email that commerce provides to the user after a completed order?

2 Answers 2

5

Since I was using the commerce email module, it was a pretty easy setup to use a rules component and then add it to my /admin/commerce/orders vbo view.

{ "rules_resend_order_email_to_customer" : {
    "LABEL" : "Resend order email to customer",
    "PLUGIN" : "action set",
    "REQUIRES" : [ "variable_email" ],
    "USES VARIABLES" : { "commerce_order" : { "label" : "Commerce Order", "type" : "commerce_order" } },
    "ACTION SET" : [
      { "variable_email_mail" : {
          "to" : [ "commerce-order:mail" ],
          "variable" : "commerce_email_order_[mail_part]",
          "language" : "default"
        }
      }
    ]
  }
}
2
  • This is similar to the solution I used. I also created a custom Message type to send a separate admin order confirmation on order completion, and used a version of the code above to provide a VBO option to resend the admin order email. Came in handy on a customer site when their fulfilment house wasn't receiving the order emails and the client didn't want them to be logging in to view the orders online. Feb 8, 2017 at 5:27
  • Thanks, just what I needed. Upvote.
    – TBJ
    Nov 22, 2019 at 7:18
0

No, there's no such functionality.

Such functionality could be implemented on top of Commerce Message (since it can save sent messages into entities, allowing them to be resent later). Will require someone to code it and submit a patch.

4
  • Thanks for following up @Bojan Zivanovic. How about a way of using vbo and rules component? I have vbo running on my admin/commerce/orders screen. Select one or more orders, choose "resend order email"...? Mar 3, 2013 at 23:04
  • Yeah, that could work. Technically, it would be generating a new email, not resending the one from checkout time, but in practice it shouldn't have a difference. Let me know if you get stuck on any one the steps. Mar 4, 2013 at 15:21
  • Cool. @Bojan Zivanovic unfortunately I am stuck on the fist step :), the component. I dont know which type of component and what to act on. Thoughts? Mar 4, 2013 at 18:38
  • I managed to figure it out and posted my answer. Thanks @Bojan Zivanovic Mar 6, 2013 at 19:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.