We use Onepage checkout in Magento 1.4
The file where the work is done is:
/app/code/core/Mage/Checkout/controllers/OnepageController.php
The function is saveOrderAction()
I want to perform an action after the order has been saved, but a) I don't see any dispatchEvent call in this function and b) I don't know which event to use or to search for.
I have seen exhaustive event lists for Mage 1.x, but I don't know how to correlate to this method.
I also need to know how to add the <observer> XML and place the function, as I have never done this before.
Best Answer
Hi you can use sales_order_place_after event.you need to define below code in your module config.xml.
If you need to define file under following path: app/code/YOUR_CODEPOOL/NAMESPACE/YOUR_MODULE/Model/NAME_OF_FILE_IN_MODEL_FOLDER.php Like Observer.php
In above file need to create function in observer.php with name which define in tag of config.xml:
I hope this will help you.