<?php
// $Id: india_356_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 india_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 ('356', 'India', 'IN', 'IND', 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, 356, 'AP', 'Andhra Pradesh'),"
          ."(%d, 356, 'AR', 'Arunachal Pradesh'),"
          ."(%d, 356, 'AS', 'Assam'),"
          ."(%d, 356, 'BR', 'Bihar'),"
          ."(%d, 356, 'CG', 'Chattisgarh'),"
          ."(%d, 356, 'GA', 'Goa'),"
          ."(%d, 356, 'GJ', 'Gujarat'),"
          ."(%d, 356, 'HR', 'Haryana'),"
          ."(%d, 356, 'HP', 'Himachal Pradesh'),"
          ."(%d, 356, 'JK', 'Jammu & Kashmir'),"
          ."(%d, 356, 'JH', 'Jharkhand'),"
          ."(%d, 356, 'KA', 'Karnataka'),"
          ."(%d, 356, 'KL', 'Kerala'),"
          ."(%d, 356, 'MP', 'Madhya Pradesh'),"
          ."(%d, 356, 'MH', 'Maharashtra'),"
          ."(%d, 356, 'MN', 'Manipur'),"
          ."(%d, 356, 'ML', 'Meghalaya'),"
          ."(%d, 356, 'MZ', 'Mizoram'),"
          ."(%d, 356, 'NL', 'Nagaland'),"
          ."(%d, 356, 'OR', 'Orissa'),"
          ."(%d, 356, 'PB', 'Punjab'),"
          ."(%d, 356, 'RJ', 'Rajasthan'),"
          ."(%d, 356, 'SK', 'Sikkim'),"
          ."(%d, 356, 'TN', 'Tamil Nadu'),"
          ."(%d, 356, 'TR', 'Tripura'),"
          ."(%d, 356, 'UA', 'Uttarakhand'),"
          ."(%d, 356, 'UP', 'Uttar Pradesh'),"
          ."(%d, 356, 'WB', 'West Bengal'),"
          ."(%d, 356, 'AN', 'Andaman & Nicobar'),"
          ."(%d, 356, 'CH', 'Chandigarh'),"
          ."(%d, 356, 'DN', 'Dadra and Nagar Haveli'),"
          ."(%d, 356, 'DD', 'Daman & Diu'),"
          ."(%d, 356, 'DL', 'Delhi')",
          uc_get_zone_ids(33));

  // 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(356,
    "!company\r\n!first_name !last_name\r\n!street1\r\n!street2"
   ."\r\n!city - !postal_code\r\n!zone_code\r\n!country_name_if");
}
