They should stick around through 1.0.9.0 but disappear after that. I would not recommend writing code using them. They continue to exist so that people don't have to immediately rewrite all the code that is already using them.
v1.0.8.1 Questions / Comments / Concerns
-
- Lead Developer
- Posts: 2332
- Joined: Tue Nov 05, 2019 6:02 pm
- Has thanked: 4 times
- Been thanked: 166 times
Re: v1.0.8.1 Questions / Comments / Concerns
Tags:
Re: v1.0.8.1 Questions / Comments / Concerns
Edit:
In case someone is stuck with it, here is the solution:
in the languages files, setlocate should be like this:
@setlocale(LC_TIME, ['de_DE.UTF-8', 'de_DE.UTF8', 'deu_deu']);
Not like this: @setlocale(LC_ALL, ['de_DE.UTF-8', 'de_DE.UTF8', 'deu_deu']);
-
- VIP Member
- Posts: 215
- Joined: Thu Mar 25, 2021 12:26 pm
- Has thanked: 7 times
- Been thanked: 3 times
Re: v1.0.8.1 Questions / Comments / Concerns
HI all
i'm not sure if it's a bug or not but:
if i want to use the function and select "0" as the default parameter it's nothing selected (as 0 seems to be "empty")
but in my array, i really have a value "0" and i want that selected
tep_draw_pull_down_menu('name', $array, "0", 'id="pProductsSkontoEnabled"')
Any ideas? (i already found out in select.php that the parameter $this->selectioni s not set if i make "0")
thank you for the help
i'm not sure if it's a bug or not but:
if i want to use the function and select "0" as the default parameter it's nothing selected (as 0 seems to be "empty")
but in my array, i really have a value "0" and i want that selected
tep_draw_pull_down_menu('name', $array, "0", 'id="pProductsSkontoEnabled"')
Any ideas? (i already found out in select.php that the parameter $this->selectioni s not set if i make "0")
thank you for the help
-
- Lead Developer
- Posts: 2332
- Joined: Tue Nov 05, 2019 6:02 pm
- Has thanked: 4 times
- Been thanked: 166 times
Re: v1.0.8.1 Questions / Comments / Concerns
Don't use tep_draw_pull_down_menu. Do use Select directly.loop wrote: ↑Mon Apr 12, 2021 10:07 am If I want to use the function and select "0" as the default parameter it's nothing selected (as 0 seems to be "empty")
but in my array, I really have a value "0" and I want that selected
Any ideas? (I already found out in select.php that the parameter $this->selection is not set if I make "0")Code: Select all
tep_draw_pull_down_menu('name', $array, "0", 'id="pProductsSkontoEnabled"')
Code: Select all
(new Select('name', $choices, ['id' => 'pProductsSkontoEnabled']))->set_selection('0')
- zipurman
- PhoenixCart Developer
- Posts: 384
- Joined: Tue Oct 13, 2020 5:20 pm
- Has thanked: 75 times
- Been thanked: 129 times
Re: v1.0.8.1 Questions / Comments / Concerns
Just noticed /includes/system/versioned/1.0.8.1/pull_down.php
Assuming this needs to be removed as the class in that file is Input and looks like an early iteration of select?
BTW, @ecartz great job on the new classes!
Assuming this needs to be removed as the class in that file is Input and looks like an early iteration of select?
BTW, @ecartz great job on the new classes!
zipurman
aka Preston Lord
-----------
Happy to help where I can
https://phoenixaddons.com
https://www.youtube.com/zipurman/ ** PHOENIX HOW-TO VIDEOS **

aka Preston Lord
-----------
Happy to help where I can

https://phoenixaddons.com
https://www.youtube.com/zipurman/ ** PHOENIX HOW-TO VIDEOS **

- edfaught
- VIP Member
- Posts: 49
- Joined: Mon Oct 26, 2020 3:22 pm
- Has thanked: 4 times
- Been thanked: 2 times
Re: v1.0.8.1 Questions / Comments / Concerns
Is there a simple replacement for tep_get_products_name()? I may be missing something but it seems to me that instantiating a product just to get its name goes a little overboard.
-
- Lead Developer
- Posts: 2332
- Joined: Tue Nov 05, 2019 6:02 pm
- Has thanked: 4 times
- Been thanked: 166 times
Re: v1.0.8.1 Questions / Comments / Concerns
Product::fetch_name -- usage example in the tep_get_products_name function.
- zipurman
- PhoenixCart Developer
- Posts: 384
- Joined: Tue Oct 13, 2020 5:20 pm
- Has thanked: 75 times
- Been thanked: 129 times
Re: v1.0.8.1 Questions / Comments / Concerns
Someone ( not me
) should create a substitution list for each of the old tep_ functions showing its new preferred method.

zipurman
aka Preston Lord
-----------
Happy to help where I can
https://phoenixaddons.com
https://www.youtube.com/zipurman/ ** PHOENIX HOW-TO VIDEOS **

aka Preston Lord
-----------
Happy to help where I can

https://phoenixaddons.com
https://www.youtube.com/zipurman/ ** PHOENIX HOW-TO VIDEOS **

-
- Lead Developer
- Posts: 2332
- Joined: Tue Nov 05, 2019 6:02 pm
- Has thanked: 4 times
- Been thanked: 166 times
Re: v1.0.8.1 Questions / Comments / Concerns
That's rather what the compatibility functions are. The deprecation notice tells the compatibility function name and file location which shows the replacement code.
Note that in replacing tep_get_products_name, it is generally better to use the object method (Product->get('name')) than the static method. However, in the specific case of needing only the name and nothing else, there is a function for that.
If someone created one in a nice spreadsheet form, no one would read it. E.g. https://docs.google.com/spreadsheets/d/ ... 6gZ2pUNpg/ answers this specific question.
- zipurman
- PhoenixCart Developer
- Posts: 384
- Joined: Tue Oct 13, 2020 5:20 pm
- Has thanked: 75 times
- Been thanked: 129 times
Re: v1.0.8.1 Questions / Comments / Concerns
Thanks @ecartz - the deprecation notice will work until the function are eventually removed. I agree that few people take the time to read the docs that are offered. I'll likely just add a replacement scheme in my IDE that converts old code to the new format 

zipurman
aka Preston Lord
-----------
Happy to help where I can
https://phoenixaddons.com
https://www.youtube.com/zipurman/ ** PHOENIX HOW-TO VIDEOS **

aka Preston Lord
-----------
Happy to help where I can

https://phoenixaddons.com
https://www.youtube.com/zipurman/ ** PHOENIX HOW-TO VIDEOS **
