As far as the customer address book entries go, it's either/or, not both.
And the same details are carried over to the orders table when an order is created during checkout.
entry_state is only ever to be filled in if there is no zone defined for their state in their country
entry_zone_id is set if the customer's country+state matches a zone combination in the zones table. In such cases, entry_state is left blank, because the entry_zone_id points to the zone name which has the correct spelling etc of that state/zone name.
Obviously, to present a list of available states/zones for a given country, you need to provide a pulldown menu such as is seen on the create-account page ... which also has some javascript to auto-update the list of available zones whenever the country pulldown selection is changed. And then, when a selection is made, the corresponding entry_zone_id is set based on the selection made.



Reply With Quote
