From a9e892e9287e705404d472a06054d5890fbf83b6 Mon Sep 17 00:00:00 2001 From: lLefevre Date: Fri, 25 May 2012 12:51:55 +0000 Subject: [PATCH] [-] BO : fix #PSCFV-2564 : imported customers with a CSV file git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@15686 b9a71923-0436-4b27-9f14-aed3839534dd --- controllers/admin/AdminImportController.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/controllers/admin/AdminImportController.php b/controllers/admin/AdminImportController.php index 738d3a400..95322fbf3 100644 --- a/controllers/admin/AdminImportController.php +++ b/controllers/admin/AdminImportController.php @@ -1664,7 +1664,12 @@ class AdminImportControllerCore extends AdminController $info = AdminImportController::getMaskedRow($line); AdminImportController::setDefaultValues($info); - $customer = new Customer(); + + if (array_key_exists('id', $info) && (int)$info['id'] && Customer::customerIdExistsStatic((int)$info['id'])) + $customer = new Customer((int)$info['id']); + else + $customer = new Customer(); + AdminImportController::arrayWalk($info, array('AdminImportController', 'fillInfo'), $customer); if ($customer->passwd)