I've seen multiple people use save_order_place_after, as well as checkout_onepage_controller_success_action. My issue is that I want to do a quick scan of information collected on that order, and update tables depending on the information collected. I've tried both of these events and get the following results (using PayPal Onepage checkout):


  • Blank page loaded (PayPal payment review page according to URL)
  • Order interrupted (no success page)
  • Payment is sent to PayPal successfully
  • No order information is saved anywhere in admin panel or database
  • Account then becomes glitched with "duplicate invoice" error and cannot place another order without receiving error
  • An email is triggered and sent successfully from the Observer.php


  • Order is successful
  • Success page loaded
  • Nothing is executed from Observer.php

There are no syntax errors in the Observer.php, as it works correctly with the first event but is apparently interrupting the order in some way.

Is there another event that's triggered after an order is successfully completed and saved so that I can scan all information collected on the order?

1 Answer 1


I've only ever had success with checkout_onepage_controller_success_action


I've updated my observer logic. I think what you've used is the problem.

Observer looks like this


class Mage_GoogleAnalytics_Model_Observer
     * @param Varien_Event_Observer $observer
    public function setGoogleAnalyticsOnOrderSuccessPageView(Varien_Event_Observer $observer)
        $orderIds = $observer->getEvent()->getOrderIds();
        if (empty($orderIds) || !is_array($orderIds)) {
        // $orderIds is array   
        // do stuff
        foreach($orderIds as $orderId) {
            $order = Mage::getModel('sales/order')->load($orderId);
            // stuff

        // or
        $orders = Mage::getModel('sales/order')
            ->addFieldToFilter('entity_id', array('in' => $orderIds));
        foreach($orders as $order) {
            // stuff

  • The only reason I can think of that might cause this event to not work for me is that it might not be grabbing the order ID correctly for some reason? Shouldn't $observer->getEvent()->getOrder(); work just fine when using this event?
    – taskle
    Jun 13, 2019 at 23:50
  • @taskle I think that might be where you've gone wrong. I've updated my answer. Jun 14, 2019 at 0:13
  • I'll have to try this way, but I'm confused as to why this event would require getting the order through a collection loop whereas sales_save_place_after you can get the order by itself.
    – taskle
    Jun 14, 2019 at 2:21
  • @taskle yep it's how magento works in this case Jun 14, 2019 at 13:02
  • When do orders have multiple order IDs?
    – taskle
    Jun 14, 2019 at 14:13

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.