Glad it's working!
Scratchilito wrote:
Would you be willing to explain the research process you used on Github?
Sure!
I find CE PhoenixCart on GitHub - I have it bookmarked, but there's also a link in the bottom here:
https://phoenixcart.org/features.php?ce ... u8nd8u9mn9
In the top right corner, I enter the deprecated function (fx tep_draw_input_field) and search the repository for results. In this case, it gave me a hit on includes/functions/general.php, so I click that and use CTRL+F to locate the exact lines.
There, the function is defined with a set of parameters (tep_function($one, $two, $three){)
Right below, the deprecated notice is added to the function, but all that comes after that, makes the function work as it used to, but with new style code. For tep_draw_input_field() we see that new Input() is the replacement. Instead of parameters going tep_draw_input_field($name, $value, $params, $type), it goes new Input($name, [$param1 => $1, $param2 => $2], $type)
Making the param an array is done in phoenix_normalize(), but since it's no longer needed in core, that function is deprecated too. Luckily, it's not too difficult to do what that function did.
To set values and required, the class has functions, but then we need to wrap the entire thing like (new Input($name, [], $type))->set('value', $value) or to require ->require()
I hope this helps! I will gladly expound or reword, if something is not too clear!
//Daniel