[-] BO : Adminimport default customers group
This commit is contained in:
@@ -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 &&
|
||||
|
||||
@@ -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
|
||||
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
|
||||
|
Reference in New Issue
Block a user