<?php
// $Id: israel_376_1.cif,v 1.2.4.3 2010-11-02 06:42:17 tr Exp $

/**
 * First implement hook_install() using the name of the country as the base of
 * the function name.
 */
function israel_install() {
  // Make the entry in the country table.
  // VALUES = Country ID, Country Name, 2-digit Code, 3-digit Code, File Version
  db_query("INSERT INTO {uc_countries} VALUES (376, 'Israel', 'IL', 'ISR', 1)");

  // Make the entries in the zones table.  Use %d for the zone_id and the
  // function uc_get_zone_ids($num) as the second argument for db_query() where
  // $num is the number of zones in the INSERT query.
  // VALUES = %d for ID, Parent Country ID, Zone Abbreviation, Zone Name
  db_query("INSERT INTO {uc_zones} VALUES "
          ."(%d, 376, 'BS', 'Be''er Sheva'),"
          ."(%d, 376, 'BH', 'Bika''at Hayarden'),"
          ."(%d, 376, 'EA', 'Eilat and Arava'),"
          ."(%d, 376, 'GA', 'Galil'),"
          ."(%d, 376, 'HA', 'Haifa'),"
          ."(%d, 376, 'JM', 'Jehuda Mountains'),"
          ."(%d, 376, 'JE', 'Jerusalem'),"
          ."(%d, 376, 'NE', 'Negev'),"
          ."(%d, 376, 'SE', 'Semaria'),"
          ."(%d, 376, 'SH', 'Sharon'),"
          ."(%d, 376, 'TA', 'Tel Aviv (Gosh Dan)')",
           uc_get_zone_ids(11));

  // Use uc_set_address_format() with the country ID as the first argument and
  // an address format string as the second.  Documentation on address formats
  // is available at:
  // http://www.ubercart.org/ubercart_users_guide/country_settings#address_format_docs
  uc_set_address_format(376,
    "!company\r\n!first_name !last_name\r\n!street1\r\n!street2"
   ."\r\n!city !zone_code !postal_code\r\n!country_name_if");
}
