I am new to Magento, but what I need to do is:
after the order is saved, I have to call an external webservice and pass some order data to this service.
Where or what is the best place to do so?
thanks in advance
Magento Stack Exchange is a question and answer site for users of the Magento e-Commerce platform. It only takes a minute to sign up.
Sign up to join this communityI am new to Magento, but what I need to do is:
after the order is saved, I have to call an external webservice and pass some order data to this service.
Where or what is the best place to do so?
thanks in advance
Create custom module and call your method in sales_order_place_after event For example Your module xml
<events>
<sales_order_place_after>
<observers>
<your_module_event_handler_name>
<class>your_module/observer</class>
<method>extraAction</method>
</your_module_event_handler_name>
</observers>
</sales_order_place_after>
</events>
Your function
public function extraAction(Varien_Event_Observer $observer) {
$order = $observer->getEvent()->getOrder();
// your code here
}