MenMarcellino Posted January 14, 2020 Share Posted January 14, 2020 (edited) 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. Edited January 14, 2020 by MenMarcellino (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now