Setup Steps

Step 1 - Setup Data File

The default location and name of the data file is /openils/var/data/zips.txt on your Evergreen server. You can choose a different location if needed.

The file format of your zips.txt will look like this (delimited by the .):

ID|StateAbb|City|ZIP|IsDefault|StateID|County|AreaCode|AlertMesg

The only fields that are used are StateAbb, City, ZIP, IsDefault, County and AlertMesg.

Most fields can be left blank if the information is not available and that data will not be entered.

Data Field Descriptions

  1. ID - ID field to uniquely identify this row. Not required, can be left blank.
  2. StateAbb - State abbreviation like "MN" or "ND".
  3. City - Name of city.
  4. ZIP - ZIP code, only first 5 digits used.
  5. IsDefault - Must be set to 1 for the row to be used. Easy way to disable/enable a row.
  6. StateID - Unknown and unused.
  7. County - County name.
  8. AreaCode - Phone number area code, unused.
  9. AlertMesg - Message to display to staff to alert them of any special circumstances.

Tip

The Address Alerts feature — described in the Staff Client Sysadmin manual — can also be used to alert staff about certain addresses.

Here is an example of what the data file should look like.

Example zips.txt. 

|MN|Moorhead|56561|1||Clay||
|MN|Moorhead|56562|1||Clay||
|MN|Moorhead|56563|1||Clay||
|MN|Sabin|56580|1||Clay||
|MN|Ulen|56585|1||Clay||
|MN|Lake Itasca|56460|1||Clearwater County||
|MN|Bagley|56621|1||Clearwater||
|MN|Clearbrook|56634|1||Clearwater||
|MN|Gonvick|56644|1||Clearwater||

Step 2 - Enable Feature

The next step is to tell the system to use the zips.txt file that you created. This is done by editing /openils/conf/opensrf.xml. Look about halfway into the file and you may very well see a commented section in the file that looks similar to this:

          <!-- zip code database file -->
          <!--<zips_file>/openils/var/data/zips.txt</zips_file>-->
     </app_settings>
</open-ils.search>

Uncomment the area by . .. Change the file path if you placed your file in a different location. The file should look like this after you are done.

          <!-- zip code database file -->
          <zips_file>/openils/var/data/zips.txt</zips_file>
     </app_settings>
</open-ils.search>

Save and Restart. Save your changes to the opensrf.xml file, restart Evergreen and restart Apache.

Note

The specific opensrf services you need to restart are "opensrf.setting" and "open-ils.search".

Step 3 - Test

Open up the staff client and try to register a new patron. When you get to the address section, enter a ZIP code that you know is in your zips.txt file. The data from the file that matches your ZIP will auto fill the city, state and county fields.