I currently have a Magento module with an observer that listens for the following events:
- sales_order_invoice_save_after
- sales_order_place_after
- sales_order_shipment_save_after
- order_cancel_after
The observer calls a method in a Model that packages important details about the order and exports them in the client's choice of output (JSON,CSV,XML) to a remote system.
I have one client that requires some mutation of the data before it's exported, though.
What I'd like to do is extend this module with a custom local module, rather than make a "special" version to maintain forever. I can extend the model easily enough to override the method that would handle this, but I'm not exactly sure how to make sure it gets called.
How can I override the class called by an observer?
Is this even the correct approach for my problem? For instance, would it be more appropriate to have some sort of dispatch Model that looks for a config setting to decide which class will handle the process?