oren22a Posted February 5, 2021 Share Posted February 5, 2021 hello guys, new to prestashop using currently 1.7.7.0 i need a bit of assitance or direction and will appreciate any help! i would like to add new fields to the order address part. i saw the usage of Localization -> countries and picking which fields to use there but i want to add more fields such as street, house num, floor etc, instead of just having address1 as a single address textbox. later on, these fields should also apear on the order info in the back office as well (just like the other address fields) i have already added the new fields into ps_address table, following a small guide i found ialtered file Address.php in classes folder, the definition part: public static $definition = [ 'table' => 'address', 'primary' => 'id_address', 'fields' => [ i added my fields here at the end and later on site got error 500, so i obviously missing some more modifications in order to make it work. for now i undo my changes. will appreciate any help, assitance of guiding on this matter. thanks! Link to comment Share on other sites More sharing options...
oren22a Posted February 5, 2021 Author Share Posted February 5, 2021 ok a small update! editing the file again, not leaving a "," in the wrong place. result in a working site again! now i noticed: 1. i cant mark these fields as "required" in Customer -> address -> mandatory fields (they dont even apear there) 2. the order save the fields to DB now, but when order is completed (Cash on delivery method) i get a 500 error (yet i see fields in the db) - order is in db, and in cms as well. 3. CMS order info page or customer-> address page doesnt show the fields at all. any hint which my next files to modify are? thanks! Link to comment Share on other sites More sharing options...
carbonx Posted February 9, 2021 Share Posted February 9, 2021 (edited) Hi, can'I override the class in backend? Thank you Edited February 9, 2021 by carbonx (see edit history) Link to comment Share on other sites More sharing options...
oren22a Posted February 10, 2021 Author Share Posted February 10, 2021 hi there! not sure if you are asking or offering any help i myself not so sharp with PS yet, just described what i did and was seeking for more help myself. thanks for the reply! 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