I am having a bit of trouble finding the code in Magento which relates to sending the new order email to the admin emails specified in the Configuration > Sales menu in the back-end.
Where is this coding please?
I would like to put in an if statement saying
if the order has items with attribute => value
then send to 1st email address;
else
send to 2nd email address`
What file should i be looking for to override and place this code into?
Thanks
Best Answer
You can find
sendNewOrderEmail
this method inMage_Sales_Model_Order
class.sendNewOrderEmail
method responsible to send new order. that is.. this code should be under "$mailer" object.Don't forget to rewrite this method before change logic.