With reference to this post viewtopic.php?f=28&t=1259
There I have changed /includes/hooks/admin/catalog/infopages.php and my changes work OK.
So I reverted the changes in the original hook file and then made the change to a copy and uploaded to /templates/override/includes/hooks/admin/catalog/infopages.php
Template Selection is set to override but the original hook file is not being overridden.
Any ideas what I am doing wrong?
Override a hook file
-
heatherbell
- Senior Contributor
- Posts: 2540
- Joined: Mon Oct 07, 2019 4:39 am
- Phoenix Version:
- Has thanked: 35 times
- Been thanked: 243 times
-
heatherbell
- Senior Contributor
- Posts: 2540
- Joined: Mon Oct 07, 2019 4:39 am
- Phoenix Version:
- Has thanked: 35 times
- Been thanked: 243 times
Re: Override a hook file
Interesting. That kinda worked, that is, the override now works but it it now does not find the associated language file.
Just before
Code: Select all
$tab_title = addslashes(INFOPAGES_TITLE);
Code: Select all
include_once(DIR_FS_CATALOG . "includes/languages/$language/hooks/admin/catalog/infopages.php");Thanks again for your insight.
-
ecartz
- Core Team
- Posts: 3084
- Joined: Tue Nov 05, 2019 6:02 pm
- Phoenix Version:
- Has thanked: 4 times
- Been thanked: 208 times
Re: Override a hook file
You could also move the language file. It would look in admin/includes/languages/{$_SESSION['language']}/classes/override/hook_admin_catalog_infopages.php