Hook into orders.php

Open to all! Ask other shopowners for help.
Post Reply
LeeFoster
Contributor
Posts: 263
Joined: Sun Feb 28, 2021 9:41 pm
Phoenix Version: v1.0.8.20
Has thanked: 1 time
Been thanked: 5 times

Hook into orders.php

Post by LeeFoster »

I'm creating a hook to replace the buttons on admin/orders.php.

Is there already a good one to use or will I need to add one in? If I need to add one where is the best place?


Join The Code Co-op to get access to your library in the Code Co-op Forum
ecartz
Core Team
Posts: 3084
Joined: Tue Nov 05, 2019 6:02 pm
Phoenix Version:
Has thanked: 4 times
Been thanked: 208 times

Re: Hook into orders.php

Post by ecartz »

Which of the buttons? Infobox? Above the table? Below the table?

The buttons below the table are in the 'buttons' hook. Content in the infobox is in the 'infoBox' hook.
LeeFoster
Contributor
Posts: 263
Joined: Sun Feb 28, 2021 9:41 pm
Phoenix Version: v1.0.8.20
Has thanked: 1 time
Been thanked: 5 times

Re: Hook into orders.php

Post by LeeFoster »

ecartz wrote: Wed May 25, 2022 7:24 am Which of the buttons? Infobox? Above the table? Below the table?

The buttons below the table are in the 'buttons' hook. Content in the infobox is in the 'infoBox' hook.
Sorry should have been more clear, downside of writing a post before the school run.

I am looking to replace the 'Invoice' and 'Packing Slip' buttons
ecartz
Core Team
Posts: 3084
Joined: Tue Nov 05, 2019 6:02 pm
Phoenix Version:
Has thanked: 4 times
Been thanked: 208 times

Re: Hook into orders.php

Post by ecartz »

So either 'contents' in the 'infoBox' hook or catch the invoice/packingslip links in 'hrefLink'. You can disable the button by returning an empty string for the link.
LeeFoster
Contributor
Posts: 263
Joined: Sun Feb 28, 2021 9:41 pm
Phoenix Version: v1.0.8.20
Has thanked: 1 time
Been thanked: 5 times

Re: Hook into orders.php

Post by LeeFoster »

ecartz wrote: Wed May 25, 2022 8:29 am So either 'contents' in the 'infoBox' hook or catch the invoice/packingslip links in 'hrefLink'. You can disable the button by returning an empty string for the link.
Should have also mentioned I'm on 1.0.8.5


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