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?

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"
        }
      }
    ]
  }
}
  • 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. – millionleaves Feb 8 '17 at 5:27
  • Thanks, just what I needed. Upvote. – TBJ 17 hours ago
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.

  • 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"...? – Nigel Waters Mar 3 '13 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. – Bojan Zivanovic Mar 4 '13 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? – Nigel Waters Mar 4 '13 at 18:38
  • I managed to figure it out and posted my answer. Thanks @Bojan Zivanovic – Nigel Waters Mar 6 '13 at 19:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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