beshop Posted July 14, 2015 Share Posted July 14, 2015 Hello I would like the administration to create in products new the field. The database I created in ps_product new column 'oy' and I add it to the administration. Field I have, but input dont read information: <input maxlength="13" type="text" id="reference" name="reference" value="{$product->oy|htmlentitiesUTF8}" /> where i find SELECT? Link to comment Share on other sites More sharing options...
musicmaster Posted July 14, 2015 Share Posted July 14, 2015 What do you mean with " I add it to the administration"? Did you mention it in classes\product.php? Link to comment Share on other sites More sharing options...
beshop Posted July 14, 2015 Author Share Posted July 14, 2015 upd, no I dont add to product.php code, only informations.tpl. :/ What i have tu add to product.php ? Link to comment Share on other sites More sharing options...
musicmaster Posted July 14, 2015 Share Posted July 14, 2015 Well, I am not an expert on the product class. But a little beyond line 250 of this file I see a list of all product fields. So it might seem logical to add your field there. Link to comment Share on other sites More sharing options...
beshop Posted July 14, 2015 Author Share Posted July 14, 2015 (edited) I want only one field where we shall represent something for me Administrator. Like this> http://strife.pl/2011/12/how-to-add-new-custom-field-in-prestashop/ and this: https://mypresta.eu/en/art/developer/new-field-product-backoffice.html but this doesnt work for me. I have prestashop 1.6 Edited July 14, 2015 by beshop (see edit history) Link to comment Share on other sites More sharing options...
beshop Posted July 14, 2015 Author Share Posted July 14, 2015 (edited) this is good(https://mypresta.eu/en/art/developer/new-field-product-backoffice.html), but in field is text 'array' and dont write to databazes. Edited July 14, 2015 by beshop (see edit history) Link to comment Share on other sites More sharing options...
musicmaster Posted July 14, 2015 Share Posted July 14, 2015 What do expect when you write an array to a database? A field in a table is just a couple of bytes. So it will have no idea how it should save your an array of select values. Do you want comma-separated values, do you want semi-colon separated values, do you want to store the complete source code of the html select statement? In fact if you study Prestashop such lists are usually stored in separate tables. Link to comment Share on other sites More sharing options...
beshop Posted July 14, 2015 Author Share Posted July 14, 2015 thanks musicmaster, I do not know whether you write. Please, please write my example. Big thaks Link to comment Share on other sites More sharing options...
beshop Posted July 14, 2015 Author Share Posted July 14, 2015 same problem like my https://www.prestashop.com/forums/topic/360219-add-extra-fields-on-product-page-ps-16/ :/ Link to comment Share on other sites More sharing options...
beshop Posted July 15, 2015 Author Share Posted July 15, 2015 can anyone help me? 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