Hello,

I've imported hundreds of customer profiles and have mapped name, address, and phone fields. The import works and I see the new customers, but when I click edit, the address fields are empty. The fields I'm mapping to are:

Address: Name line
Address: Thoroughfare
Address: Dependent locality
Address: Administrative area
Address: Postal code

The phone, email, and custom fields I have on the profiles all work. I have a view with the above fields and I am able to see the new customers and the value of those fields, just not when I click edit.

Comments

ashzade’s picture

Issue summary: View changes

I was Googling for another import issue and stumbled on this issue that I opened sometime ago and figured out thanks to the #drupal-commerce team on IRC: you must also map the 'Country' field for this to work completely

ashzade’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

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

scottAtRoot802’s picture

Version: 7.x-1.3 » 7.x-1.4

I'm having this same issue, except none of the fields are populated. Yes, I've mapped the country field.

While looking at the database, I've notice the following table are populated with the imported data.

  • commerce_addressbook_defaults
  • commerce_customer_profile

While the following table is empty:

  • field_data_commerce_customer_address

There import seems to happen without any errors and I don't see any errors in the log. Any help would be appreciated.

scottAtRoot802’s picture

Here is an export of the feed:

$feeds_importer = new stdClass();
$feeds_importer->disabled = FALSE; /* Edit this to true to make a default feeds_importer disabled initially */
$feeds_importer->api_version = 1;
$feeds_importer->id = 'customer_address_import';
$feeds_importer->config = array(
  'name' => 'Customer Billing Address Import',
  'description' => 'Import Drupal Commerse Customers Billing Addresses',
  'fetcher' => array(
    'plugin_key' => 'FeedsFileFetcher',
    'config' => array(
      'allowed_extensions' => 'txt csv tsv xml opml',
      'delete_uploaded_file' => FALSE,
      'direct' => FALSE,
      'directory' => 'public://feeds',
      'allowed_schemes' => array(
        0 => 'public',
      ),
    ),
  ),
  'parser' => array(
    'plugin_key' => 'FeedsCSVParser',
    'config' => array(
      'delimiter' => ',',
      'encoding' => 'UTF-8',
      'no_headers' => 0,
    ),
  ),
  'processor' => array(
    'plugin_key' => 'FeedsCommerceCustomerProfileProcessor',
    'config' => array(
      'customer_profile_type' => 'billing',
      'mappings' => array(
        0 => array(
          'source' => 'User_ID',
          'target' => 'guid',
          'unique' => 1,
        ),
        1 => array(
          'source' => 'User_ID',
          'target' => 'uid',
          'unique' => FALSE,
          'language' => 'und',
        ),
        2 => array(
          'source' => 'Company_Name',
          'target' => 'commerce_customer_address:organisation_name',
          'unique' => FALSE,
          'language' => 'und',
        ),
        3 => array(
          'source' => 'First_Name',
          'target' => 'commerce_customer_address:first_name',
          'unique' => FALSE,
          'language' => 'und',
        ),
        4 => array(
          'source' => 'Last_Name',
          'target' => 'commerce_customer_address:last_name',
          'unique' => FALSE,
          'language' => 'und',
        ),
        5 => array(
          'source' => 'Billing_Country',
          'target' => 'commerce_customer_address:country',
          'unique' => FALSE,
          'language' => 'und',
        ),
        6 => array(
          'source' => 'Billing_Address',
          'target' => 'commerce_customer_address:thoroughfare',
          'unique' => FALSE,
          'language' => 'und',
        ),
        7 => array(
          'source' => 'Billing_Address_2',
          'target' => 'commerce_customer_address:premise',
          'unique' => FALSE,
          'language' => 'und',
        ),
        8 => array(
          'source' => 'Billing_City',
          'target' => 'commerce_customer_address:locality',
          'unique' => FALSE,
          'language' => 'und',
        ),
        9 => array(
          'source' => 'Billing_State',
          'target' => 'commerce_customer_address:administrative_area',
          'unique' => FALSE,
          'language' => 'und',
        ),
        10 => array(
          'source' => 'Billing_Zip',
          'target' => 'commerce_customer_address:postal_code',
          'unique' => FALSE,
          'language' => 'und',
        ),
        11 => array(
          'source' => 'Billing_Phone',
          'target' => 'commerce_customer_address:phone_number',
          'unique' => FALSE,
          'language' => 'und',
        ),
        12 => array(
          'source' => 'Billing_Phone_Ext',
          'target' => 'commerce_customer_address:phone_number_extension',
          'unique' => FALSE,
          'language' => 'und',
        ),
      ),
      'insert_new' => '1',
      'update_existing' => '2',
      'update_non_existent' => 'skip',
      'input_format' => NULL,
      'skip_hash_check' => 0,
      'bundle' => 'billing',
      'language' => 'und',
    ),
  ),
  'content_type' => '',
  'update' => 0,
  'import_period' => '-1',
  'expire_period' => 3600,
  'import_on_create' => 1,
  'process_in_background' => 0,
);