Nothing to do with the hook. Your invoice code probably has an error. Check your error log or switch display errors on.Mort_Lemur wrote: ↑Fri Jun 12, 2026 4:21 pmThanks for that hook code, however when i rename my invoice invoice_fancy.php and edit the hook code to match it seems to only render the top half of the invoice to just below the address boxes?raiwa wrote: ↑Fri Jun 12, 2026 1:06 pm Example of a sitewide hook for your case:
placed and named:
includes/hooks/admin/siteWide/redirectInvoice.php
Code: Select all
class hook_admin_siteWide_redirectInvoice { function listen_siteWideStart() { if (Request::get_page() == 'invoice.php') { Href::redirect(Guarantor::ensure_global('Admin')->link('invoice_ara.php')->retain_query_except()); } } }
Yet when the file is named invoice.php and the hook is deleted, the whole invoice shows.
How to do this in Phoenix?
-
raiwa
- Certified Developer
- Posts: 1640
- Joined: Sat Dec 21, 2019 8:08 am
- Phoenix Version: 1.1.0.6
- : Buy Me A Beverage
- Has thanked: 70 times
- Been thanked: 152 times
Re: How to do this in Phoenix?
Public Phoenix Change Log Cheat Set on Google Sheets
https://docs.google.com/spreadsheets/d/ ... sp=sharing
Need Help?viewtopic.php?f=10&t=27
https://docs.google.com/spreadsheets/d/ ... sp=sharing
Need Help?viewtopic.php?f=10&t=27
- 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: How to do this in Phoenix?
as @bonbec advised replicating the language file invoice.php as invoice_fancy.php solved the problem 
- burt
- Core Team
- Posts: 4550
- Joined: Tue Oct 29, 2019 9:37 am
- Phoenix Version: v1.1.0.8
- : Buy Me A Beverage
- Has thanked: 252 times
- Been thanked: 412 times
Re: How to do this in Phoenix?
Sometimes `not changing core code` appears impossible, so if you do find a bottleneck somewhere...let us know.
We will then change core to solve the bottleneck if needed.
Or point you down the right path to do what you need without core changes. (eg, as per this thread)
We will then change core to solve the bottleneck if needed.
Or point you down the right path to do what you need without core changes. (eg, as per this thread)