0

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

  • Which magento version? Every time order saved (create/update) or after place order? – Sohel Rana Sep 3 '17 at 16:34
0

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
}
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.