Reputation: 899
I am totally new to drupal and have googled my self silly without finding anything even remotely useful.
I am told that ubercart sends out an admin mail automatically when an order is submitted by a customer. I am trying to find the code that does this / controls this so that I can add a check for the orders 'ship to' country and set the admin mail email address based on that country. So if the country is Canada I want an email containing the order to be filled sent to one email address if country is USA to a different email address.
If somebody could point me in the right direction I would appreciate it.
Upvotes: 1
Views: 909
Reputation: 21
You could set some inbox rules on your admin email account to look for keywords (ie Canada, USA...) in the email and then forward the emails automatically when the hit the inbox. You would probably need to include the shipping and/or billing address in your email template. you can find the email templates in the following directory on your server:
/sites/all/modules/ubercart/uc_order/templates
Upvotes: 1
Reputation: 6891
I don't know if there is any specific in Ubercart for this but I doubt it. Wha you can try is to implement the generic hook_mail_alter() hook. First, just print out the $message array then order something so see what you are working with.
You can likely depend on the id to check if it's an order notification mail and maybe the order object is even somewhere in the message array too.
Upvotes: 2