Hi Nicolas,
I work with Nico on this project, so let me follow up on his question.
3rd party plugins aside, there are two ways the order status can be changed:
- Directly from within the order lis view.
- When editing an order.
It's these two situations Nico refers to. To be honest, I don´t quite understand why the data I receive in the onAfterOrderUpdate event handler, is not exactly the same in both cases. After all, in both cases it is exactly the same order and the event is triggered by HikaShop itself.
I am also not quite sure how $element->old is of any help here. Unless the data in $element is always exactly the same as that of $element->old, in which case $element->old is redundant. What am I missing here?
Interesting and helpful is your mention of 3rd party plugins. This has not been taken into account in our own plugin yet, so we must pay attention to that. If only minimal amount of order data is provided in the onAfterOrderUpdate event handler, I guess we must get hold of the missing information ourselves. What would be the correct way to do that; to obtain all data about the order and the associated customer?