1

I need to send order details once order is created using SOAP API,

Now i am storing all the orders that are creating in the gap of 5 mins in a link and making the link refresh every minute using cron job and passing the values to external application , is this the right approach

How to send order details instantly once order is created

1 Answer 1

1

You can use the sales_order_place_after event to get the order data. This event is dispatched in Mage_Sales_Model_Order::place()

Mage::dispatchEvent('sales_order_place_after', array('order'=>$this));

The observer method should look like this:

public function placeOrderAfter($observer){
    $order = $observer->getEvent()->getOrder();
    //your code
}

Next, you can do whatever you like with the order data (create cron tasks, send data to the external application, etc).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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