PrestaShop checkout stops working after updating. I had updated PrestaShop and the cart stopped working. Customers could start the account creation, but once they click to save address, the page refreshes, and it does not load the payment page.
This is because when updating, the following row was not added in the database.
Follow the steps to fix the issue.
- Find out the name of your database
- Gain access to either SSH or PHPMYADMIN to edit your DB
- Run the query below and replace PREFIX_hook with the DBNAME_hook – so in my case I had named my DB prstadb so the query looked like INSERT INTO prstadb_hook – its essentially the hook column in the database.
position) VALUES (NULL, ‘actionValidateCustomerAddressForm’, ‘Customer address form validation’, ‘This hook is called when a customer submits its address form’, ‘1’, ‘1’);
If the solution did not help.
Essentially each country has a set of fields which are required, I believe there was a bug for certain countries after an update, that it changed the format in the database. Inside your database find the tables
Inside find the
XXX_address you can find the country ID which is giving you issues. I had created myself as a user and saved as country Spain, which saved with ID 6 as show below.
Back to the other table “
XXX_address_format” I found country with ID number 6, which would be Spain, and clicked edit.
When I checked the fields and compared to a working country, I saw the information inside was different –
|Correct Format (Country: UK)||Incorrect Format (Country: Spain)||Corrected Format (Country: Spain)|
I have highlighted the differences above, below phone in Spain there was an empty space instead of having phone_mobile field. The postcode and city fields were in one line instead of separate lines.
So I copied the correct version into the field and saved. Make sure to check that your back-office Country settings are the same as the changes you have made into the database. You will find this at International > Locations > Countries > SELECT THE COUNTRY.
For me, this solved the problem.
If any of the 2 solutions helped you, please help us by following one of our social media or by sharing this page with others. I would greatly appreciate the support.