PHP Deprecated:

Ask the community for help with CE Phoenix Cart.
Post Reply
Xpajun
VIP Member
VIP Member
Posts: 186
Joined: Thu Mar 04, 2021 1:18 pm
Has thanked: 3 times
Been thanked: 6 times

PHP Deprecated:

Post by Xpajun »

Not sure if this has been addressed or not, but is there any old to new coding to replace the tep_ functions?

Getting fed up with deleting the errors - almost 1 per second :shock:
Current Store is now running 1.0.9.0 - php 8.2.18
Now working on taking a short rest :D - php 8.2.18
heatherbell
VIP Member
VIP Member
Posts: 2170
Joined: Mon Oct 07, 2019 4:39 am
Has thanked: 30 times
Been thanked: 202 times

Re: PHP Deprecated:

Post by heatherbell »

burt
Lead Developer
Lead Developer
Posts: 2694
Joined: Tue Oct 29, 2019 9:37 am
Has thanked: 52 times
Been thanked: 151 times

Re: PHP Deprecated:

Post by burt »

Replacing tep_* functions should be more or less straightforward.
Old addons (or old custom code) usually need to be updated.

EG:
if an old addon uses this to get a products name;

Code: Select all

$products_name = tep_get_products_name($p, $l); 
It will create this error in the error_log;
The tep_get_products_name function has been deprecated.
You then need to find "tep_get_products_name" to see what the replacement is;

Code: Select all

  function tep_get_products_name($product_id, $language_id = null) {
    trigger_error('The tep_get_products_name function has been deprecated.', E_USER_DEPRECATED);
    return Product::fetch_name($product_id, $language_id);
  }
Now you know that you need to update your old code

from this:

Code: Select all

$products_name = tep_get_products_name($p, $l); 
to this:

Code: Select all

$products_name = Product::fetch_name($p, $l); 
Xpajun
VIP Member
VIP Member
Posts: 186
Joined: Thu Mar 04, 2021 1:18 pm
Has thanked: 3 times
Been thanked: 6 times

Re: PHP Deprecated:

Post by Xpajun »

Xpajun wrote: Mon Feb 12, 2024 11:11 am Not sure if this has been addressed or not, but is there any old to new coding to replace the tep_ functions?

Getting fed up with deleting the errors - almost 1 per second :shock:
UPDATE: I've just found a working link to Raiwa's spreadsheet:

Code: Select all

https://docs.google.com/spreadsheets/d/1R-tBvdqGC0NrppEes7z2xQp6xe1zi3LMT46gZ2pUNpg/edit#gid=0
- which does have the new coding for most if not all the tep_changes
Current Store is now running 1.0.9.0 - php 8.2.18
Now working on taking a short rest :D - php 8.2.18
Xpajun
VIP Member
VIP Member
Posts: 186
Joined: Thu Mar 04, 2021 1:18 pm
Has thanked: 3 times
Been thanked: 6 times

Re: PHP Deprecated:

Post by Xpajun »

Thanks everyone for your help
Current Store is now running 1.0.9.0 - php 8.2.18
Now working on taking a short rest :D - php 8.2.18
Post Reply