I want to extend Order view and add custom button in it, dynamically, depends from custom order field
I got a subscriber. In it I use: ‘Enlight_Controller_Action_PostDispatchSecure_Backend_Order’ => ‘onOrderPostDispatch’. In onOrderPostDispatch I check for ActionName to extend.
But when I use getActionName == ‘load’ the order id is not set, ‘load’ fires when I get orders list, may be early. If I use getActionName == ‘loadStores’, I have order id, and get the data from the DB, but it looks like at this step is too late to extend the overview.js, how can I do it?
I need a place where is the right moment to extend and in same time to be able to get the order Id.