I have 10 customer group in my website. I would send the order admin notification email to different address, based on user customer group.
For example.
User from customer_group_a take order will send admin notification to order1@website.com. Then user from customer_group_b take order will send admin notification to order2@website.com
Also, how can i get the customer data in order email? I try this, but not working in email/sales/order_new.html:
{{var customer.name}}
To send to different people, the best is to add the needed email adressess via system.xml to be able to edit in your back-office the emails then you will need to override app/code/core/Mage/Sales/Model/Order.php
to fit with your logic. The lines that interest you are in queueNewOrderEmail()
function.
Try to use the constant for the path to your config.
For the name in your template, you can normally use {{var order.customer_name}}
if my memory is good or {{var order.customer.name}}
. The functions getCustomer()
and getCustomerName()
exist in the precited class.