How to trigger an email in Magento when an order is made?
There are two possible ways to achieve this:
-
You can create a model override for the class
Mage_Sales_Model_Order
and override the function byMage_Sales_Model_Order::sendNewOrderEmail
emailing the store owner using a different template -
You can set the configuration record "Sales Email / Order / Submit Order by Email" to nothing (so the store owner does not receive the same email address as the customer) and so that the watcher catches the event
sales_order_place_after
. In the observer function, you send an email to the store owner using a template with no price information.
source to share
I know I had a hack for this ... and then I no longer have it. I went through everything I could, and right now, we are communicating with the client's email. Once we finish updating the site, I'll have to read my hack. I am sure that this is app/core/Mage/Sales/Model/Order.php
possible inpublic function sendNewOrderEmail()
See this picture:
I remember hardcoding in the file after the client notification was sent, we sent another one to the admin but hardcoded the template id for the transactional notification email to 8. Now somehow I am doing it the "right" way "but have no idea how I run this transactional email ALSO with a customer order notification.
source to share