Page 1 of 1

tep_get_prid DEPRECATED

Posted: Tue Jun 22, 2021 5:04 pm
by Owl
Greetings,

Im getting this issue on Phoenix 1.0.8.0 @ PHP 7.4:

PHP Deprecated: The tep_get_prid function has been deprecated. in /xxx/xxx/xxx/xxx/admin/includes/functions/general.php on line 367

Anyone else having this issue?

Kind regards

Re: tep_get_prid DEPRECATED

Posted: Tue Jun 22, 2021 5:07 pm
by heatherbell
Owl wrote: Tue Jun 22, 2021 5:04 pm PHP Deprecated: The tep_get_prid function has been deprecated. in /xxx/xxx/xxx/xxx/admin/includes/functions/general.php on line 367
See Line 84 for fix here: https://docs.google.com/spreadsheets/d/ ... sp=sharing

Re: tep_get_prid DEPRECATED

Posted: Tue Jun 22, 2021 5:10 pm
by Kofod95
My guess is that this is causes by and addon that needs updating - particularily of the use of tep_get_prid function, which, if I got it right, has been deprecated due to the introduction of a product class.

Where does the error happen, and which addons are installed?
The fix provided by @heatherbell (and @raiwa ) should be made where the call of tep_get_prid is, and not in includes/functions/general.php

//Daniel

Re: tep_get_prid DEPRECATED

Posted: Tue Jun 22, 2021 7:34 pm
by Owl
heatherbell wrote: Tue Jun 22, 2021 5:07 pm See Line 84 for fix here: https://docs.google.com/spreadsheets/d/ ... sp=sharing
That was quite handfull. Many thanks!!!

Re: tep_get_prid DEPRECATED

Posted: Tue Jun 22, 2021 7:37 pm
by Owl
Kofod95 wrote: Tue Jun 22, 2021 5:10 pm My guess is that this is causes by and addon that needs updating - particularily of the use of tep_get_prid function, which, if I got it right, has been deprecated due to the introduction of a product class.

Where does the error happen, and which addons are installed?
The fix provided by @heatherbell (and @raiwa ) should be made where the call of tep_get_prid is, and not in includes/functions/general.php

//Daniel
Gonna dig that out is theres a module using this function. Thanks!

I can´t see @raiwa fix

Re: tep_get_prid DEPRECATED

Posted: Tue Jun 22, 2021 8:31 pm
by Kofod95
Owl wrote: Tue Jun 22, 2021 7:37 pm I can´t see @raiwa fix
His is the man behind the spreadsheet linked, and the one who wrote line 84 in it, thus providing the solution/replacement for the tep_get_prid function.
You can find the place to change it, by searching the files for "tep_get_prid" (VS-code and Notepad++ has the ability to search for that in entire folders - a lot of other softwares might do the job as well, but these two I know). Alternatively, you might be able to figure it out by looking at the page giving the error - for example; if the error occurs when editing a product, you should search for hooks placed in includes/hooks/admin/categories, or admin/categories.php, if you have edited the core file.
If you have the addons you have installed listed somewhere, you should be able to find the source of the error rather quickly (Search is fastest, but I mentioned the others in case you prefer the other methods).

//Daniel

Re: tep_get_prid DEPRECATED

Posted: Tue Jun 22, 2021 10:46 pm
by Owl
Kofod95 wrote: Tue Jun 22, 2021 8:31 pm
Owl wrote: Tue Jun 22, 2021 7:37 pm I can´t see @raiwa fix
His is the man behind the spreadsheet linked, and the one who wrote line 84 in it, thus providing the solution/replacement for the tep_get_prid function.
You can find the place to change it, by searching the files for "tep_get_prid" (VS-code and Notepad++ has the ability to search for that in entire folders - a lot of other softwares might do the job as well, but these two I know). Alternatively, you might be able to figure it out by looking at the page giving the error - for example; if the error occurs when editing a product, you should search for hooks placed in includes/hooks/admin/categories, or admin/categories.php, if you have edited the core file.
If you have the addons you have installed listed somewhere, you should be able to find the source of the error rather quickly (Search is fastest, but I mentioned the others in case you prefer the other methods).

//Daniel
Many thanks for your fast reply.

I´ve contacted @raiwa since some of his add-ons had the deprecated function call.