Jump to content

How to add new text field into add costumer page


s.shanee

Recommended Posts

Hi Guys,

 

I am new to core code and structure of prestashop. Can you please guide me how can i add new label and text field to add new costumer page in admin panel.

 

UPDATED: FYI I have added text field to add costumer page. But now I am having issue how to save new text field data into ps_costumer and ps_address tables.

 

your guidance will be highly appreciated...

Edited by s.shanee (see edit history)
Link to comment
Share on other sites

Hm.. I did not really get what you want to do. If you want to add a new tab to BackOffice, you can find enough information on this forum. In addition, if you want to add additional fields to objects, you will find them in classes folder and you could edit those $field values. PrestaShop automatically gets information from the database based on those values.

Link to comment
Share on other sites

My point is simple I have added new text fields to costumer registration page in backend. Now I want to save it to database. I have already created new fields in mysql database (ps_address) table. I would really love if you can explain it with details HOW TO SAVE NEW TEXT FIELD DATA into customer table.

Link to comment
Share on other sites

You need to program a code to do that. AdminTab logic is in /youradmin/tabs/tabname and you can find all the information there. However, I am afraid that you are doing this wrong, as there is a special address class which you can find in classes/address.php or if you need to change/edit customer configuration, you need to check on /classes/customer.php.

 

As I have said there is a special array for fields from the database where you need to specify every field parameters and it. By doing this properly the information will be saved automatically or you will just need some code in order to get value from form which can be done by calling Tools::getValue() etc.

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...