There is a number of changes on Russian regions that have no reflection in current .cif file for Russia.
Several regions were united together.
Here is the list of changes (I'm not providing patch to .cif as I have no information on where I can get iso codes for the regions:
regions KAM+KOR formed new region "Камчатский край", CHI+AGB formed new region "Забайкальский край", region UOB moved into region IRK ("Иркутская область")

key - ubercart zone_id
value - new region name
commented - old ubercart name

    166 => 'Камчатский край', // Камчатская область
    199 => 'Забайкальский край', // Читинская область
    204 => 'Забайкальский край', // Агинский Бурятский автономный округ
    205 => 'Камчатский край', // Корякский автономный округ
    207 => 'Иркутская область', // Усть-Ордынский Бурятский автономный округ
CommentFileSizeAuthor
#2 russia_643_2.cif_.txt7.12 KBtr

Comments

tr’s picture

Category: bug » task
Status: Active » Needs work
tr’s picture

Status: Needs work » Needs review
StatusFileSize
new7.12 KB

Here is a new version of the .cif file for Russia. You will have to remove the .txt extension and put this file into your ubercart/uc_store/countries directory. Then visit admin/store/settings/countries/edit, scroll down to "Russia", and click on "update". Then place a test order to see if all the zone selections are up to date.

@restyler: PLEASE try it out and tell me if it is correct.

longwave’s picture

When removing obsolete zones (such as in this CIF) what happens to orders that came from that zone? Won't they lose their zone name altogether?

Perhaps we should store zone names as text after checkout, to avoid rewriting history. And this would also let administrators enter custom zone names if needed when creating/editing orders in the admin pages...

tr’s picture

Yes, the way it currently works in Ubercart is that removing/renaming zones or removing countries has the potential to make some historical order data meaningless (there's a warning to this effect if you try to uninstall a country that was used by any customer for any order). So my plan in #1062548: Unify CIFs between versions involves keeping all country data revisions in the database. That way, zone_id and country_id aren't ever deleted or modified and are forever valid. The country and zone tables will be JOINed on both a country_id and a version_id, and the obsolete zones will just have an older version number. Only a few percent of the country files have ever been changed in the past 3+ years, so I don't believe that versioning will result in any significant database growth over time.

restyler’s picture

Status: Needs review » Reviewed & tested by the community

Hey TR,
I've quickly reviewed your code and tested the new .cif on my ubercart store. It looks fine, new regions are there in checkout details selectboxes and are working fine.

tr’s picture

Version: 6.x-2.4 » 7.x-3.x-dev
Status: Reviewed & tested by the community » Patch (to be ported)

Committed to 6.x-2.x.

tr’s picture

Status: Patch (to be ported) » Fixed

Ported.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.