Overwriting Core Functions

Is it possible for an addon to override the functionality of a core function?

Specifically, I need to rewrite how fn_get_orders works in order to incorporate our ERP system. I started by using an orders.post.php that builds my array and passes it to {$orders} but when the sort functionality is called it doesn't sort my orders from the ERP, only the internal orders. I believe this is because each sort makes an AJAX call which in turn runs fn_get_orders, but since my array is built outside of that function, my orders aren't included. I've attempted to modify fn_get_orders with my own addon but it doesn't override the core, it only injects my code somewhere in the middle of the native functionality.

Any suggestions?

you can use .post , .pre and .override. i suggeest looking into .override in the cs cart documentation

You can als look ar the 'grt_orders_pre' PHP hook where you can include your own fields, conditions and joins.

what is your ERP ?

we modified Microsoft Dynamics RMS to download internet orders

They use some older system that I'm not familiar with (don't recall the name, but it won't be one you've heard of). Essentially I provided them a DB table to update with info from their ERP, then I map the contents of that table into cs-cart and do all the little adjustments necessary to setup features, options, imagery, etc…