1

I've created a rule that sends a thank you email to anyone who donates less-than-or-equal-to a certain amount (which works perfectly), but I cannot figure out how to pull out the total $ amount of all donations on the order and include it in the email.

If it were guaranteed there would only ever be a single donation line item the issue would be simple. However, there is no guarantee there won't be more than one on a single order, and there will usually be at least one other line item of a different product type included in the order. I've searched, but cannot figure out how to, for example, calculate the total donation amount for an order that has 2 donation line items of $10 & $20, plus one or more other line items of a different product type, then put the donation total into the thank you email that gets sent out.

Any / all help will be much appreciated!

1 Answer 1

0

Use commerce_donate module to get donation then this field use in your rules

  1. Create a rule add events in Rule
  2. Add condition entity has a field (your donation field)
  3. Add variables in this you can use php field to get total amount of donation.
  4. Add action in email section use token of variables

I am not already try this but hopefully this may work.

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.