diff --git a/controllers/admin/AdminImportController.php b/controllers/admin/AdminImportController.php index 57bcba88d..cb2be6f3c 100644 --- a/controllers/admin/AdminImportController.php +++ b/controllers/admin/AdminImportController.php @@ -1989,9 +1989,6 @@ class AdminImportControllerCore extends AdminController $addresses = $customer->getAddresses((int)Configuration::get('PS_LANG_DEFAULT')); } - if (!isset($customer_groups) || count($customer_groups) == 0) - $customer_groups = array(0 => Configuration::get('PS_CUSTOMER_GROUP')); - // Group Importation if (isset($info['group']) && !empty($info['group'])) { @@ -2064,6 +2061,7 @@ class AdminImportControllerCore extends AdminController //set temporally for validate field $customer->id_shop = $default_shop->id; $customer->id_shop_group = $default_shop->getGroup()->id; + $customer_groups[] = $customer->id_default_group; $customer_groups = array_flip(array_flip($customer_groups)); $res = true; if (($field_error = $customer->validateFields(UNFRIENDLY_ERROR, true)) === true && diff --git a/docs/csv_import/customers_import.csv b/docs/csv_import/customers_import.csv index bb119bcc0..8f839bc8e 100644 --- a/docs/csv_import/customers_import.csv +++ b/docs/csv_import/customers_import.csv @@ -1,3 +1,3 @@ -id;Active (0/1);Gender ID (Mr=1, Ms=2, else 9);E-mail*;Password*;Birthday;Lastname*;Firstname*;Newletter (0/1);Opt-in (0/1) -1;1;1;johndoe@prestashop.com;#res152EDRF;1987-09-21;Doe;John;1;1 -2;1;2;mariedoe@prestashop.com;58@ret26#;1986-10-14;Doe;Marie;0;1 \ No newline at end of file +id;Active (0/1);Gender ID (Mr=1, Ms=2, else 9);E-mail*;Password*;Birthday;Lastname*;Firstname*;Newletter (0/1);Opt-in (0/1);Groups (x,y,z...);Default group ID;ID / Name of shop +1;1;1;johndoe@prestashop.com;#res152EDRF;1987-09-21;Doe;John;1;1;1,2;1;1 +2;1;2;mariedoe@prestashop.com;58@ret26#;1986-10-14;Doe;Marie;0;1;1,3;3;1 \ No newline at end of file