I'm trying to hook into the sales_order_place_after method in my observer and save information about the just placed order into a new database table. I'm able to hook into the event successfully, but when I try to access the order object, I keep getting the error User Error: Some transactions have not been committed or rolled back.

This is my config.xml:


This works fine. The problem I'm getting is in my observer:

public function saveOrderIdToAttendees($observer) {

    $order = $observer->getEvent()->getOrder();


For some reason I don't even have access to the getEvent() method. I've tried logging just the $observer->getEvent() object and that gives me the same error.


2 Answers 2


I suggest the event checkout_submit_all_after in this case. As far as a I know sales_order_place_after is triggered when you have placed an order using Multishipping but checkout_submit_all_after will always get triggered.


and use

 $order = $observer->getEvent()->getData('order');
  • Thank you! This worked for me. Just curious, is there any particular reason to take out the <type>singleton</type>?
    – ZeLoubs
    Oct 8, 2014 at 16:58
  • hi you can use singleton
    – Amit Bera
    Oct 8, 2014 at 17:02
  • @AmitBera will this event only trigger after payment process?
    – Anto S
    Jul 30, 2015 at 6:38
  • no immediate after order place..
    – Amit Bera
    Jul 30, 2015 at 6:48

Sounds like the observer is called before the order is actually saved to the database. Try sales_order_save_commit_after for an event which is called after the MySQL transaction has been completed.

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.