Jump to content
electriz

[TUTORIAL] Adding new fields to the registration form in PrestaShop 1.7

Recommended Posts

Nice tutorial but you don't respect PrestaShop developments basics.

You explain to modify core files.

So everything will be lost in case of update.

The best way for doing it is to use overrides or to create module. 

Regards, 

 

Edited by hhennes (see edit history)

Share this post


Link to post
Share on other sites
On 13.04.2018 at 9:11 AM, hhennes said:

Nice tutorial but you don't respect PrestaShop developments basics.

You explain to modify core files.

So everything will be lost in case of update.

The best way for doing it is to use overrides or to create module. 

Regards, 

 

 

I'm aware of that so I point the files and places to modify.

However you are right and I will include info about moving changed files to override/ directory - to prevent losing it.
 

Share this post


Link to post
Share on other sites

Nice tutorial but you don't respect PrestaShop developments basics.

You explain to modify core files.

So everything will be lost in case of update.

The best way for doing it is to use overrides or to create module. 

 

 

 

What does it means hennes?

Thanks

Share this post


Link to post
Share on other sites

Hi,

I mean that this tutoriel doesn't use the best way to add new fields ;)
If you update your prestashop instance all changes will be lost.
As the changes are done in core files, which will be replaced during the update.

  • Like 1

Share this post


Link to post
Share on other sites

In my point of view, the best way is often to make a module.
Then to use the native hooks ( if possible ), in order to be the less invasive on the website.

 

Regards

Share this post


Link to post
Share on other sites

Well, it shows You place to modify in the Core files, but in the end You move it to the override/.

So even if core files are changed, your override will stay.

Some modules may be better, but maybe some people wants to save a few bucks and to this by themselves? That's why I'm showing one way to do this. And I'm not saying it's the best one. Just one of them.

P.S. Even hook names and their appearance in different PS verions are changing, so you still can not be sure if using a module it will last forever. To be "the less invasive" you would have to use all built-in modules only or most popular with frequent updates to the latest PS versions.

Edited by electriz (see edit history)

Share this post


Link to post
Share on other sites

very nice the tutorial.

but i have 2 questions don't know how to do it.

1.  Donot know how to Replace in DESTINATION files.

2.How can translate the 'My field required' ?i can't find it in the translations in the backoffice.

 

Thank you very much

123321.png

Share this post


Link to post
Share on other sites
Posted (edited)
On 7/8/2017 at 2:27 AM, electriz said:

I've written a tutorial about extending registration form by adding your new fields:

 

http://prestacraft.com/adding-new-fields-to-the-registration-form-in-prestashop-1-7/

 

Enjoy :)

Thank you so much for the tutorial! 

I have added the field but labels are not appearing in the back-office internationals-> translations !
  Please help.

Edited by tulsa.lale (see edit history)

Share this post


Link to post
Share on other sites

Please provide help in 1.7.6 .  Structure and architecture for admincustomercontroller is totally different.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More