How to trigger an email in Magento when an order is made?

I need a solution for the following: 1) A customer orders an order 2) Shop owner receives an email WITHOUT price information (e.g. packing list)

What files do I need to edit (I've read a lot of posts and they don't seem to mention file paths).

thank

+3


source to share


3 answers


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 by Mage_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.

+1


source


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: Magento Transaction Emails



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.

+1


source


Make your own module in this module, just send the event after "sales_order_save_after". Catch this event in the observer file and put your custum encoding on the observer. Read this

0


source







All Articles