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

<pre><code>craft()-&gt;templates-&gt;hook('cp.commerce.order.edit.main-pane', function (&amp;$context) { ... }
</code></pre>

<p>If there is more 'elegant' solution, please shoot.<br>
Cheers.</p>

CC BY-SA 4.0
2018-07-20T11:37:35.787Z
2018-07-20T11:45:49.233Z
2018-07-20T11:45:49.233Z
syntax-punk
<p>My plugin is sort of an extension for the Craft Commerce, where I need to provide custom data on the craft commerce orders page.<br>
So I'm wondering is there a way to listen for an event, which fires when an admin navigates to the Orders page?<br>
Thanks. </p>

<plugin-development><plugin-craftcommerce>
Craft 2: Is there a hook for Craft Commerce Orders admin page?
# Craft 2: Is there a hook for Craft Commerce Orders admin page?

(Asked by: username_0 on 2018-07-20)

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?  
Thanks.

**Tags:** plugin-development, plugin-craftcommerce

---

## 1 answers

### Answer by username_0 on 2018-07-20. Score: 1 | Accepted answer

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.
Cheers.


---

