My plugin is sort of an extension for the Craft Commerce, where I need to provide custom data on the craft commerce orders page.
So I'm wondering is there a way to listen for an event, which fires when an admin navigates to the Orders page?


Ok, I got a solution. In my plugin's init function I've done the following hook:

craft()->templates->hook('cp.commerce.order.edit.main-pane', function (&$context) { ... }

If there is more 'elegant' solution, please shoot.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.