Hi people, I want to change via web service a remote inventory, I know that via Event Observer Method can triger my code, but I don't know which event is useful to complete my task, like on_order_complete, is there an updated list of events or more documentation?
A:
Use grep to find the list of events, it must be something like
grep -rn -A2 --include="*.php" dispatchEvent /var/www/magento/
or something like that...
greg0ire
2010-06-15 15:21:40
+1
A:
I did a blog post about this (which contains the full event list for Magento CE 1.4) a few weeks ago.
The events that may interest you for an order placement is sales_order_place_after
, which gets called after the order is placed (seriously!).
Hope that helps!
Thanks, Joe
Joseph Mastey
2010-06-15 18:56:21
Thanks Joe, excellent post but I have some questions:This sales_order_place_after fires when the administrator complete the order? or is just when the user finish the cekout process?I need to change when the administrator completes the order after shipping notification to the user
Christian
2010-06-15 23:25:18
The sales_order_place_after event fires when an order is added to the system. If you're looking for a single event when the order is moved to a 'completed' state, there is no specific event for that. You should be able to use sales_order_save_after instead and check the status of the order.
Joseph Mastey
2010-06-16 02:14:41
thanks for your answer Joseph!
Christian
2010-06-16 05:43:14