Jump to content

Getting Internal Server Error 500 when setting phone field to required in addresses


Reho

Recommended Posts

I'm using PS 1.7.2.4 and I decided to set phone as a required field in the future.

When my customers who hasn't got the phone field filled trying to checkout, they received an internal server error 500. 

This is in the exception log:

*ERROR*         v1.7.2.4        2018/01/10 - 13:32:22: Property Address->phone is empty. at line 944 in file classes/ObjectModel.php

I think the normal procedure shoud drop an error message about the missing parts of the address. What solutions is there are?
 

Link to comment
Share on other sites

  • 2 months later...
  • 2 weeks later...

actually I've sorted out the issue, all you have to do is:

1. go to International ---> Locations ----> Countries---> EDIT the country you want to set

there in the Address format field I set:

firstname lastname
company
vat_number
address1
postcode city
Country:name
phone
phone_mobile

all could be chosen from the "Required fields for the address (click for more details):" or you can simply copy and paste 

2. go to Customer Settings ----> Addresses ----> (and down below click "Set required fields for this section") then choice the Field names

Field Name

company

address2

postcode

other

phone

phone_mobile

vat_number

dni

all must be the same as the chosen from step one in the Address format 

I hope that will help a little

Countries   Edit  Poland.png

Addresses •Set required fields for this section.png

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

  • 1 year later...
  • 3 weeks later...

...HERE IS HOW TO FIX IT.... in ps 1.7.5 - getting rid off error 500 in checkout

Go to your file AddressFormat.php into the path Project_Folder/classes/AddressFormat.php, the list of requireFormFieldsList.

And type the fields you want here.
For example 'phone',

If that is the field you want as required

Hope this helps.

 

 

 

46488500-20781d80-c803-11e8-80db-2222f9fd8f2b.png

  • Like 1
Link to comment
Share on other sites

  • 1 month later...

Hello,

I had the same problem on my client Prestashop, after an upgrade from 1.6 to 1.7.
The reason was a row in the ps_required_field table (I suppose it was added there by another module, under the 1.6 version ?)

image.png.458021d98105f7bd14a4acb8157f7093.png

I just deleted that row, and now it works as expected 🙂

Hope it helps.

Best regards,
-- Arnaud Dohogne (AD-DEV)

 

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

  • 3 years later...
On 6/7/2019 at 8:50 AM, Luxur said:

...HERE IS HOW TO FIX IT.... in ps 1.7.5 - getting rid off error 500 in checkout

Go to your file AddressFormat.php into the path Project_Folder/classes/AddressFormat.php, the list of requireFormFieldsList.

And type the fields you want here.
For example 'phone',

If that is the field you want as required

Hope this helps.

 

 

 

46488500-20781d80-c803-11e8-80db-2222f9fd8f2b.png

 

Thank you Luxur, this work for me on 1.7.2.4 too. 

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