Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save chered/c82a922d4f3f21018f4c to your computer and use it in GitHub Desktop.
Save chered/c82a922d4f3f21018f4c to your computer and use it in GitHub Desktop.
by default drupal commerce does not have an email sent when an order status has been completed. this is a rule just import it and straightaway you can use it.
{ "rules_send_email_after_order_status_is_completed" : {
"LABEL" : "send email after order status is completed",
"PLUGIN" : "reaction rule",
"REQUIRES" : [ "rules", "entity" ],
"ON" : [ "commerce_order_update" ],
"IF" : [
{ "data_is" : { "data" : [ "commerce-order:status" ], "value" : "completed" } }
],
"DO" : [
{ "mail" : {
"to" : "[commerce-order:mail]",
"subject" : "Order [commerce-order:order-number] at [site:name]",
"message" : "Thank you. We have completed and processed now your order. Your Order Number is: [commerce-order:order-number] Order History. You can view your order history with us at any time by logging into our website at [site:login-url] Order Status You can also follow the status of your current order at: [commerce-order:customer-url] Thank you for being our customer!",
"language" : [ "" ]
}
}
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment