6 replies [Last post]
Alaska's picture
Offline
Joined: 10/16/2007
Juice: 1433
Was this information Helpful?

Removed some of the extra listings in uc store>countries>united_states_840_1.cif. However the DB does not refresh to indicate those changes. What is a good way to update the DB? i.e. did not need American Samoa, etc.

Note: Did go into the DB at uc_zones and remove the unwanted listings to match what is in the cif file. But would rather have the cif file make the changes if possible so all would be in sync.

Jim

qrios's picture
Offline
Cool profile pic award.Getting busy with the Ubercode.Internationalizationizer
Joined: 08/13/2007
Juice: 554
Re: Modifying List of US States via CIF File

.cif files are imported. Delete the country via the Ubercart interface, then reimport the altered .cif file should work I think.

Luck

Kees

Alaska's picture
Offline
Joined: 10/16/2007
Juice: 1433
CIF File

Kees:

Took a look at removing USA as suggested. It comes up with a warring in that there are orders associated with USA and removing it would cause errors. So did not remove on the test site.

Did rename the file but it has to have a different name and a number other than "united_states_840_1.cif" as it does not show up in the Import Country field if kept as is.

Renamed as "united_states_short_841_1.cif" and then changed all of the 840's in the file to 841's. It now does show up in the Import Country field but when run comes up with a "Country file has no install function".

However for a new Uber installation the modified "united_states_840_1.cif" file that has the edited list installed fine. Checked the DB on that site and the shorter list is installed with the "Zone ID's" sequentially numbered. In the hacked DB version, the Zone ID numbers skip as those lines were removed in the DB.

The overall conclusion is that it is best to install the modified file when the site is setup. There however, should be a way to refresh the DB with a new listing but after the fact may cause an issue as the Zone ID's would then be different for each state. Not sure where or how the Zone Id's are used, but if they change other error messages will soon follow.

Jim

qrios's picture
Offline
Cool profile pic award.Getting busy with the Ubercode.Internationalizationizer
Joined: 08/13/2007
Juice: 554
Re: CIF File

I wouldn't recommend changing the CIF number, as it may conflict with an existing country.

I guess there isn't a GUI way of doing this once the site is in use, and you must delete/alter rows in the uc_countries and uc_zones (I believe that's their names) tables in DBS.

Luck,

Kees

xerbutter's picture
Offline
Bug Finder
Joined: 09/07/2007
Juice: 146
Re: Modifying List of US States via CIF File

I just removed the rows from the uc_zones table that I was not using. This seems to work fine.

Alaska's picture
Offline
Joined: 10/16/2007
Juice: 1433
Zone ID

Yes did the same on this end and removing the material from the DB in uc_zones worked fine. That way the Zone ID's do not change. Assume that the Zone ID's are used to identify the state for other calls to the DB. Have not looked into that, but it seems to be a reasonable use for that Zone ID field.

Of course, in a new install an altered CIF file will be read into the DB with its altered changes. But as stated, there is no GUI that is presently in place for that operation.

Thanks for all of the great feedback.

Jim

coderheatherj's picture
Offline
Joined: 11/01/2008
Juice: 2
Modifying cif for sales tax purposes

Hi,

Thanks for the info about altering the .cif file. I was able to get in there and change the zones for the US to accomodate SC's tax zones (determined by county). Instead of just having SC be one zone, I am entering in 1 zone for each SC county. Then in the Workflow_ng, I can assign the 4 different rates to their appropriate counties. When the customer from SC fills out their address, they choose their SC county from the list of states (South Carolina-NAME OF COUNTY) and the appropriate tax is applied.
This comment also relates to the post about Florida's tax rates--this concept may work for them as well.