1
Answers
Vote up!
0
Vote down!

Send Email by Rule based on payment mehtod

I am using the commerce email and commerce invoice modules to send out emails using rules, for example when an order is completed or when the status of an order changes.

Now the content of my emails should be a bit different, depending on the payment method. For example, if the user choose Bank Transfer, i want to mention the bank account number, if he used COD, i want to describe the extra costs and procedure.

I did not find a way to get variable text depending on the payment method within the email body. So I figured, I could add some extra mail templates (say one template for COD orders and one template for Bank Transfer orders). I then would create one rule 'Send email for COD' and one rule 'Send email for Bank Transfer'. And in the condition I wanted to select the payment method. But I cannot figure out how to get the payment method into a data selector.

Any idea on this???

Thanks

Asked by: dready2011
on October 16, 2012

1 Answer

Vote up!
1
Vote down!

If you have a rule acting on the "After updating an existing commerce order" event you should be able to add the "Selected payment method comparison" condition and then select the payment method you want to target.

David Kitchen
Answer by: David Kitchen
Posted: Nov 1, 2012