2 replies [Last post]
pmckibben's picture
Offline
Joined: 03/18/2009
Juice: 22
Was this information Helpful?

Hi,

Is there any way to modify the list of U.S. states for billing/shipping, other than manually changing the uc_zones table in the database? Right now, my client only wants to handle the continental US, Hawaii, and Alaska--not American Samoa, Marshall Islands, Puerto Rico, etc. But they may change their mind later, and I would rather find a more suitable way to enable/disable states.

For now, I may just use a custom module with hook_form_alter and a lookup table of allowed states, but I wanted to see if anyone else has found a better way.

Thanks,
Paul

cybertoast's picture
Offline
Joined: 12/25/2008
Juice: 33
Re: Drupal 5/Ubercart 1.7: modifying list of states

The simplest solution is to just create a custom .cif file with the changes you want, and import that in the Store Administration -> Country Settings -> Import Countries pane.

But I think there's possibly a deeper issue here. I really think that this should be an extra column in the .cif file which defines a flag for the zone. Since many locations around the world have things like territories and "formal" states, this should be a filterable option.

What I would recommend is a Zone_Flag field. It would have the following possible values:
0/null = continental states (default)
1 = offshore states
2 = continental territories
3 = off-shore territories
4 = ?

This would then tie into an administration setting in the Country Settings page, as a filter on the imported data. But this may actually get to be more complicated to manage in some respects. So maybe the simple solution is best for now Smiling

pmckibben's picture
Offline
Joined: 03/18/2009
Juice: 22
Re: Re: Drupal 5/Ubercart 1.7: modifying list of states

Thanks, cybertoast! That indeed sounds simple. Should be easy to change, too, if the need arises: just create another .cif file.