I recently migrated the OC to another server, same for the same version... I thought the migration went okay, until new customers couldn't add or amend addresses. The issue comes for the compulsory Region/State field. Any new attempt to add or amend an address will not be allowed, because the field can't move away from blank, and because it requires some data in there, not changes can be allowed.
If an existing customer checks out the past his/her addresses, the region/state pull-down menu comes out as a blank, where previously there some data there.
This what appears when it fails:
Code: Select all
Fatal error: Uncaught Error: Object of class stdClass could not be converted to string in /opencart/htdocs/catalog/model/localisation/country.php:4 Stack trace: #0 /opencart/storage/modification/system/engine/loader.php(248): ModelLocalisationCountry->getCountry() #1 /opencart/htdocs/system/engine/proxy.php(47): Loader->{closure}() #2 /opencart/htdocs/catalog/controller/account/address.php(447): Proxy->__call() #3 /opencart/htdocs/catalog/controller/account/address.php(68): ControllerAccountAddress->validateForm() #4 /opencart/storage/modification/system/engine/action.php(79): ControllerAccountAddress->edit() #5 /opencart/htdocs/catalog/controller/startup/router.php(25): Action->execute() #6 /opencart/storage/modification/system/engine/action.php(79): ControllerStartupRouter->index() #7 /opencart/htdocs/system/engine/router.php(67): Action->execute() #8 /opencart/htdocs/system/engine/ in /opencart/htdocs/catalog/model/localisation/country.php on line 4
Code: Select all
<?php
class ModelLocalisationCountry extends Model {
public function getCountry($country_id) {
$query = $this->db->query("SELECT * FROM " . DB_PREFIX . "country WHERE country_id = '" . (int)$country_id . "' AND status = '1' ");
return $query->row;
}
....
Thank you.