2
votes

I am trying to import Customers to Magento. The problem is that it shows error for country specific tlds. For example [email protected] gives and error and import scripts says the email is not valid.

But when I create a user from the front end with the same email id, the account is created. What should I do so that Magento stops giving error on customer Import?

1
how are you trying to import Customers? The account is create from frontend because .pk is presented in lib/Zend/Validate/Hostname.php in array $_validTlds - Sergei Guk
I am importing through CSV import. But thanks for the head start, i will now sort out things by looking at the file. - S. A. Malik

1 Answers

4
votes

So the customer import process works via the file /app/code/core/Mage/ImportExport/Model/Import/Entity/Customer.php. Here you will find the email check.

if (!Zend_Validate::is($email, 'EmailAddress')) {
    $this->addRowError(self::ERROR_INVALID_EMAIL, $rowNum);
}

It is the exact same check that is done when a customer is created via the front end. I would suggest the following to debug this.

  1. Check that the customer with this address can be created via the front end,
  2. Check that you have not overwritten the customer entity for the import,