Jump to content

(HELP) How to edit Address form


Woore

Recommended Posts

Hi guys. i am having some problems with my address form. Some customers are complaining that my site is stupid since its asking for the following fields. i need your help to fix this problem .

 

i would like to disable prestashop from requiring to fill the following field boxes in the address form

 

Company

Address 2

Mobile phone number.

 

I do not want to remove the boxes from the form. i would like for the customer to have option if they need to have them. but i don't want prestashop to require them. 

 

i am running PrestaShop 1.5.6.0. I would really appreciate all the help i can get .

 

 

post-455545-0-46107000-1396372792_thumb.png

post-455545-0-88681600-1396372801_thumb.png

Link to comment
Share on other sites

Hi Woore,

Do you use a custome Theme? I believe normally in Default theme these fields aren't required (Although I thought either ONE of the phone numbers is required then). Can you try to change to default theme for a moment and try there?

 

If it is theme related, we need to have a look what they are doing there...

 

Give it a try,

pascal.

  • Like 1
Link to comment
Share on other sites

Hi Woore,

Do you use a custome Theme? I believe normally in Default theme these fields aren't required (Although I thought either ONE of the phone numbers is required then). Can you try to change to default theme for a moment and try there?

 

If it is theme related, we need to have a look what they are doing there...

 

Give it a try,

pascal.

HI Pascal. thank you for your reply. I do have a custom theme. I checked the Default theme but i still have the same problem. It seem like problem is from the setup or from the default theme. i can't seem to figure out how to fix. i would appreciate any help you can give me  . Thank you in advance. 

Link to comment
Share on other sites

I do not have the guest checkout feature on. As far as I know only registered customers.

 

I been playing around on a separate folder with a fresh install . And I don't have this problem with the fresh install. Now I know that has to do something with the setup. If I update to the latest prestashop would it fix the issue?

Link to comment
Share on other sites

Edit the file

htdocs\prestashop15\classes\Address.php

 

find the array with all form fields and delete the require attribute. I am not in front of my computer to give you exact instructions. but if you not succeed let me know.

  • Like 1
Link to comment
Share on other sites

Edit the file

htdocs\prestashop15\classes\Address.php

 

find the array with all form fields and delete the require attribute. I am not in front of my computer to give you exact instructions. but if you not succeed let me know.

Thank you so much sdancer75 and PascalVG. now its working like it should. I deteled the lines. Not sure if i did it correct but its working fine now. 

Link to comment
Share on other sites

Thank you so much sdancer75 and PascalVG. now its working like it should. I deteled the lines. Not sure if i did it correct but its working fine now. 

 

This is not the right way, since as I saw in the "htdocs\prestashop15\classes\Address.php" the specific fields are not obligated. So, I suppose its up your current theme. If you delete the fields and then change or upgrade theme, you might have problems.

 

Search inside the theme and replace the JavaScript code that makes the specific fields as obligatory fields. 

Edited by sdancer75 (see edit history)
Link to comment
Share on other sites

This is not the right way, since as I saw in the "htdocs\prestashop15\classes\Address.php" the specific fields are not obligated. So, I suppose its up your current theme. If you delete the fields and then change or upgrade theme, you might have problems.

 

Search inside the theme and replace the JavaScript code that makes the specific fields as obligatory fields. 

I have no idea how to do that. I have no knowledge when it comes to Code. Any way that you point me in the right direction . or help me . thanks again

Link to comment
Share on other sites

I have no idea how to do that. I have no knowledge when it comes to Code. Any way that you point me in the right direction . or help me . thanks again

 

Hi,

 

In the default theme you will never ask to complete the the mobile and the address2 fields. I checked to the code and I saw they are not obligated.

 

So, I suppose its up your custom theme or version of prestashop you are using. I am talking for prestashop 1.5.6. I have not installed other version so I am talking specific for that version. In this version it should work as it supposed to work without problems from the very beggining.

 

For other versions or custom theme, check your *.tpl files at

 

You should open C:\xampp181\htdocs\prestashop15\themes\xxxxx

 

where xxxx = is the name of your theme

 

TPL files are regular html files that additionally uses smarty script to call the framework functions.

 

Files should be checked are

 

authentication.tpl

address.tpl 

addresses.tpl.

 

If you know nothing from html, jscript or smarty code, I suggest to leave it as it, since it works fine. I can not give you exact instructions, since I dont have your theme/version installed in my system.

 

Regards,

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...