hooks/admin/siteWide

Open to all! Ask other shopowners for help.
Post Reply
azpro
Contributor
Posts: 177
Joined: Fri Nov 06, 2020 8:25 am
Phoenix Version: v1.1.0.6
Has thanked: 30 times
Been thanked: 34 times

hooks/admin/siteWide

Post by azpro »

Hi all!

I am trying to make some changes to admin and need to replace siteWide files - bit want to keep the original files. So no overwriting - bit preferably disable a file. I tried to copy to template/default/includes/hooks/admin/siteWide but this does not give the result I hoped for. Also tried in override/includes/hooks/admin/siteWide/ but this also does not give the wanted result.

The Wiki did not give me the help I hoped for : https://github.com/CE-PhoenixCart/Phoen ... Overriding

Any ideas?

Thanks!


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: hooks/admin/siteWide

Post by ecartz »

Maybe just admin/includes/classes/override/hook_admin_site_wide_boot_strap.php

Admin overrides aren't really intended for hook files though. So expect some weirdness to get it working. Like how it doesn't use the same file name (most overrides work off class name). And that's if it works at all. I haven't tried it.

It might be easier to just remove the files.
14Steve14
Senior Contributor
Posts: 923
Joined: Fri Oct 25, 2019 7:01 pm
Phoenix Version: v1.0.9.1
Has thanked: 17 times
Been thanked: 103 times

Re: hooks/admin/siteWide

Post by 14Steve14 »

What is it that you are trying to do as there are many hooks already available where additional code can be added.
azpro
Contributor
Posts: 177
Joined: Fri Nov 06, 2020 8:25 am
Phoenix Version: v1.1.0.6
Has thanked: 30 times
Been thanked: 34 times

Re: hooks/admin/siteWide

Post by azpro »

14Steve14 wrote: Mon Sep 18, 2023 3:08 pm What is it that you are trying to do as there are many hooks already available where additional code can be added.
In short ... Complete overhaul of Admin. We have an Osc shop with large quantities (products - customers - orders - categories etc.) so the standard admin is not good enough for us.

My workaround for now is to create a second (maintaininig the original admin) "admin-extra" and modify this to the wanted result. But this means you will need different siteWide files - and since they are on shop-side this makes it complicated to make it in a manageble way ... Especially for new versions to come. So I try to follow the Phoenix preferred work-flow (in loading hooks and classes) - and still have the flexibility I need for admin.

It is simple to code "around" to get a working admin-extra ... but I prefer to follow Gary's @burt and Matts @ecartz architecture - at least when possible.


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