In checkout, customers are unable to fill state/province field when country is Canada. No selector/drop-down box appears for this line. Typing anything in province field returns "Please select a billing state" when form is submitted.

Comments

gordon’s picture

These have been filled out for as many countries that I could find, but some are missing.

Please take a look at http://api.drupalecommerce.org/api/ecommerce/ecommerce--ec_store--region... in the ec_store/regions/ca.inc file and fill out the states (provinces). and if you can send this to me so I can make these changes in the system.

See the us.inc file for an example of how it should work.

avonleadesign’s picture

Thanks, Gordon. My ca.inc file now looks like this:

<?php
// $Id: ca.inc,v 1.1.2.2 2010/12/16 11:55:58 gordon Exp $

/**
 * @file
 */

/**
 * Implementation of hook_ec_region_COUNTRYCODE_info().
 */
function ec_store_ec_region_ca_info() {
  return array(
    // Measures
    'weight' => 'KG',
    'length' => 'M',
    'area' => 'M2',
    'volume' => 'M3',
    // Geo
    'state_name' => t('Province'),
    'use_state_names' => TRUE,
    'zip' => TRUE,
    'states' => array(
      'AB' => t('Alberta'),
      'BC' => t('British Columbia'),
      'MB' => t('Manitoba'),
      'NB' => t('New Brunswick'),
      'NL' => t('Newfoundland & Labrador'),
      'NT' => t('Northwest Territories'),
      'NS' => t('Nova Scotia'),
      'NU' => t('Nunavut'),
      'ON' => t('Ontario'),
      'PE' => t('Prince Edward Island'),
      'QC' => t('Quebec'),
      'SK' => t('Saskatchewan'),
      'YT' => t('Yukon'),
    ),
    // Price format
    'payment_symbol' => '$',
    'payment_symbol_position' => 1, // Left
    'payment_thousands' => ',',
    'payment_decimal' => '.',
    'payment_decimal_places' => 2,
  );
}
davea’s picture

These are in the dev version as of February 6, 2011.

see http://drupal.org/cvs?commit=495892