Admin Hooks - More Please?

Talk about Hooks. Share Hooks you have made.
Post Reply
User avatar
Mort_Lemur
Builder
Posts: 63
Joined: Tue Jun 02, 2026 6:12 pm
Phoenix Version: v1.1.0.6
Has thanked: 42 times
Been thanked: 17 times

Admin Hooks - More Please?

Post by Mort_Lemur »

Hi everyone,

I'm developing a large admin add-on for Phoenix that extends the order management functionality. Im avoiding editing core files like the plague, but have come across a limitation.

I'd like to add an additional action button for the currently selected order in the Orders page, ideally alongside the existing Edit, Delete, Invoice and Packing Slip buttons in the right-hand information panel.

I've found hooks such as extraButtons on the Orders page itself and on the edit view, but I can't find a hook in:

Code: Select all

admin/includes/actions/orders/infoboxes/default.php
where those order-specific action buttons are created.

Before I consider any workaround, I wanted to ask whether I've missed an existing extension point.

If not, would it be possible to add a generic hook in that file? Something along the lines of:

Code: Select all

$admin_hooks->cat('extraOrderInfoButtons')
or whatever naming convention you feel is appropriate.

The intention wouldn't just be for my add-on—it would allow any admin extension to add order-specific actions without modifying Phoenix core files. Examples might include:

CRM integrations
Shipping integrations
Fraud checking
ERP exports
Custom order processing tools

It seems like a useful extension point for add-on developers in general.

Is this something that would be considered for a future release? or could I add a hook now in anticipation?

Thanks


Join The Code Co-op to get access to your library in the Code Co-op Forum
Dan Cole
Senior Contributor
Posts: 498
Joined: Fri Oct 25, 2019 2:14 pm
Phoenix Version: 1.0.8.21
Has thanked: 67 times
Been thanked: 61 times

Re: Admin Hooks - More Please?

Post by Dan Cole »

These threads might help....Gary pointed me at them when I was trying to do something similar.

viewtopic.php?f=50&t=3403

viewtopic.php?f=10&t=2431

Dan
User avatar
Mort_Lemur
Builder
Posts: 63
Joined: Tue Jun 02, 2026 6:12 pm
Phoenix Version: v1.1.0.6
Has thanked: 42 times
Been thanked: 17 times

Re: Admin Hooks - More Please?

Post by Mort_Lemur »

@Dan Cole Thank you! All sorted now :)
User avatar
burt
Core Team
Posts: 4551
Joined: Tue Oct 29, 2019 9:37 am
Phoenix Version: v1.1.0.8
Has thanked: 252 times
Been thanked: 412 times

Re: Admin Hooks - More Please?

Post by burt »

@ all

If anyone does find a need for a Hook in some place - there would be no objection from me to adding into Core Code. It might already exist as you found here; just make a thread like this and your idea can be explored and pointed a way to do what you want, or a new hooking point added etc.

--

There are a couple of known bottlenecks in the admin area that I have plans to make more flexible at some point. As always it's a case of finding time to actually do the code changes and more importantly the time to properly test.
I am not here to build for you.
I am here to build with you. Let's help each other.


Join The Code Co-op to get access to your library in the Code Co-op Forum
Post Reply