PrestaCraft on Facebook

Please like our page on Facebook to get notifications about new tutorials :)



Today I’m going to show you a simple fix for changing default PrestaShop validation field name.

It looks like this:


As you can see, it doesn’t look well. The message should show:
Last name instead of lastname
First name instead of firstname
Password instead of passwd
My field required instead of my_field_required

Let’s edit necessary file(s) to make it pretty!

For any other language than english

An example for Polish lanauge:

Edit: /translations/pl/fields.php

Where pl is your language code.

$_FIELDS array looks like this:

Replace all occurences of firstname with First name and lastname with Last name.

For passwd change, you have to add the following lines:

How does it work?
PrestaShop translation system is based on MD5 hashing.
76a2173be6393254e72ffa4d6df1030a is a passwd converted to MD5.

Click here to see a cool MD5 converter


If you have any custom fields (in this example – my_field_required), just hash it with MD5 and add to $_FIELDS array, just like you did with password.

For english language

Edit: /translations/en/fields.php

As you can see this file is barely filled.

Now, you know how to add a translation. Use that MD5 trick and add your fields to this file. You can just copy and paste desired fields and translate it as you wish.

Leave a comment

Your email address will not be published.


Leave a comment

Your email address will not be published.