Originally Posted by
generikz
ZC 1.5.6c
Debian 10
PHP 5.6.40
Hello!
I tried to google/search the forum but didn't find anything compelling...
I found this page
https://docs.zen-cart.com/user/local...dress_formats/ explaining the address formats, that's all good.
I also found where in the Admin Panel you can update the address_format ID in the Country definition.
France (country 73) default is set to 1 but it's more of a 5 really (ZIP code BEFORE the city).
So I updated France to use 5:
Name: France
Code ISO (2) : FR
Code ISO (3) : FRA
Address Format : 5
But going around the Admin orders, the address are still using the format 1 with City, Postcode.
Should I make modifications somewhere else as well?
Julien
The database's orders table includes a customers_address_format_id, billing_address_format_id and delivery_address_format_id. For the addresses to be displayed using the updated address-format, those fields will require update, too.
Assuming that the various _country fields (3 of them) are set to France when the associated address is in France, you could (after backing up your database!) run the following SQL statements to get the orders' address formats updated, too:
Code:
UPDATE orders SET customers_address_format_id = 5 WHERE customers_country = 'France';
UPDATE orders SET billing_address_format_id = 5 WHERE billing_country = 'France';
UPDATE orders SET delivery_address_format_id = 5 WHERE delivery_country = 'France';
Running the above statements in the admin's Tools :: Install SQL Patches will 'resolve' the DB_PREFIX. If you're using phpMyAdmin, you'll need to apply that prefix for each of the UPDATE statements, e.g. using zen_orders instead of orders.
Bookmarks