Welcome to Discussion Forum, where you can ask questions and receive answers from other members of the community.

I am Unable to save order address in Prestashop 1.7

0 like 0 dislike

i am getting this error when i am trying to save my adress in Prestashop 1.7, i've changed adress format in backend and after removing country from format i am unable to save address, can someone please help me with that ?

Image showing that error:

[PrestaShopException]
 
Property Address->id_country is empty
at line 915 in file classes/ObjectModel.php
 
910.             }
911. 
912.             $message = $this->validateField($field, $this->$field);
913.             if ($message !== true) {
914.                 if ($die) {
915.                     throw new PrestaShopException($message);
916.                 }
917.                 return $error_return ? $message : false;
918.             }
919.         }
920. 
ObjectModelCore->validateFields - [line 248 - classes/ObjectModel.php]
ObjectModelCore->getFields - [line 489 - classes/ObjectModel.php]
ObjectModelCore->add - [line 176 - classes/Address.php] - [2 Arguments]
AddressCore->add - [line 447 - classes/ObjectModel.php] - [2 Arguments]
ObjectModelCore->save - [line 76 - classes/form/CustomerAddressPersister.php]
CustomerAddressPersisterCore->save - [line 144 - classes/form/CustomerAddressForm.php] - [2 Arguments]
CustomerAddressFormCore->submit - [line 111 - classes/checkout/CheckoutAddressesStep.php]
CheckoutAddressesStepCore->handleRequest - [line 57 - classes/checkout/CheckoutProcess.php] - [1 Arguments]
CheckoutProcessCore->handleRequest - [line 199 - controllers/front/OrderController.php] - [1 Arguments]
OrderControllerCore->initContent - [line 201 - classes/controller/Controller.php]
ControllerCore->run - [line 366 - classes/Dispatcher.php]
DispatcherCore->dispatch - [line 28 - index.php]

 

asked Feb 24, 2017 in Prestashop by harsh (8,710 points)

1 Answer

0 like 0 dislike
The country field in the address table of PrestaShop is required, hence it is not possible to remove it from the address format.
 
Please check the structure of ps_address table in your store's database for more details.
answered Feb 25, 2017 by harsh (8,710 points)

Related questions

0 like 0 dislike
2 answers 2,169 views
0 like 0 dislike
1 answer 52 views
52 views asked Jun 9, 2017 in Magento by harsh (8,710 points)
0 like 0 dislike
0 answers 311 views
0 like 0 dislike
0 answers 184 views
184 views asked Mar 17, 2017 in Prestashop by harsh (8,710 points)
0 like 0 dislike
1 answer 62 views
...