Where to put a replacement for includes/actions/add-product.php so it overrides the standard file? I've tried a few places
includes/system/override
includes/system/override/includes/actions
templates/override/includes/includes
templates/override/includes/includes/actions
with no luck.
add_product override
- Kofod95
- Senior Contributor
- Posts: 748
- Joined: Sat Feb 06, 2021 7:38 pm
- Phoenix Version: 1.0.8.20
- Has thanked: 99 times
- Been thanked: 179 times
Re: add_product override
Not sure, but my guess would be that either
included/system/override/actions/add_product.php
Or
templates/override/includes/actions/add_product.php
should work?
//Daniel
included/system/override/actions/add_product.php
Or
templates/override/includes/actions/add_product.php
should work?
//Daniel
I'm not smart, but sometimes even a blind chicken can find a corn.
Here are a lot of corns: Phoenix user guide
Here are a lot of corns: Phoenix user guide
-
ecartz
- Core Team
- Posts: 3084
- Joined: Tue Nov 05, 2019 6:02 pm
- Phoenix Version:
- Has thanked: 4 times
- Been thanked: 208 times
Re: add_product override
You might want to dump the $GLOBALS['class_index'] variable and see where it has the file set.
If worst comes to worst, use $GLOBALS['class_index']->set to override the location directly.
If worst comes to worst, use $GLOBALS['class_index']->set to override the location directly.
-
frankl
- Builder
- Posts: 159
- Joined: Tue Feb 23, 2021 8:39 pm
- Phoenix Version: v1.1.0.4
- Has thanked: 17 times
- Been thanked: 25 times
Re: add_product override
Thanks Matt
I copied the amended file to includes/system/override/includes/actions/add_product.php
Created a system hook shop side with function:
Code: Select all
function listen_startApplication() {
$GLOBALS['class_index']->set('phoenix\_actions\add_product', DIR_FS_CATALOG . 'includes/system/override/includes/actions/add_product.php');
}Code: Select all
[files:protected] => Array
(
[phoenix\_actions\add_product] => /home/testsite/public_html/includes/system/override/includes/actions/add_product.php
[add_product] => /home/testsite/public_html/includes/system/override/includes/actions/add_product.php
[actions:protected] => Array
(
[0] => Phoenix\Actions\add_productCheck out my addons - app.php/addons/author/frankl/contributions
-
ecartz
- Core Team
- Posts: 3084
- Joined: Tue Nov 05, 2019 6:02 pm
- Phoenix Version:
- Has thanked: 4 times
- Been thanked: 208 times
-
frankl
- Builder
- Posts: 159
- Joined: Tue Feb 23, 2021 8:39 pm
- Phoenix Version: v1.1.0.4
- Has thanked: 17 times
- Been thanked: 25 times
Re: add_product override
Just the hint I needed. Thanks Matt
Check out my addons - app.php/addons/author/frankl/contributions