Hi prestashopers.
I write a module in which I save information in a complex form - serialized. The display of such information is illegible and unedited, which is why I want to display the input form.
I just wanted to insert a value:
public function renderForm()
{
$ unserializedArray = unserialize (AdParameters :: getParametersValue (Tools :: getValue ('id_ad_parameters')));
$ Result = '';
foreach ($ unserializedArray as $ key => $ row) {
foreach ($ row as $ element) {
$ Result. = '['. $ Element. ']';
}
if (isset ($ unserializedArray [$ key + 1]))
$ MyValue. = "\ R \ n";
}
$ helper-> fields_value ['parameters_value'] = $ MyValue;
................
Form
return parent::renderForm();
}
AdParameters :: getParametersValue() is function quering DB
When I list MyValue everythink is ok but in my list is not ok.
However, it does not change the value.
I need to replace it in the table and when editing in the form.
Can anyone help me with this? Please.
if you need a broader explanation, let me know, I'll send them.