Skip to content

Commit 7e1eb9d

Browse files
author
Eric Bohanon
committed
MAGETWO-65667: Error Importing Customer multiselect attribute
- Import multiselect separator now used for updating data
1 parent 9fb33f5 commit 7e1eb9d

File tree

1 file changed

+9
-0
lines changed
  • app/code/Magento/CustomerImportExport/Model/Import

1 file changed

+9
-0
lines changed

app/code/Magento/CustomerImportExport/Model/Import/Address.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -535,6 +535,15 @@ protected function _prepareDataForUpdate(array $rowData)
535535
} elseif ('datetime' == $attributeParams['type']) {
536536
$value = (new \DateTime())->setTimestamp(strtotime($rowData[$attributeAlias]));
537537
$value = $value->format(\Magento\Framework\Stdlib\DateTime::DATETIME_PHP_FORMAT);
538+
} elseif ('multiselect' == $attributeParams['type']) {
539+
$separator = isset($this->_parameters[Import::FIELD_FIELD_MULTIPLE_VALUE_SEPARATOR]) ?
540+
$this->_parameters[Import::FIELD_FIELD_MULTIPLE_VALUE_SEPARATOR] :
541+
Import::DEFAULT_GLOBAL_MULTI_VALUE_SEPARATOR;
542+
$value = str_replace(
543+
$separator,
544+
Import::DEFAULT_GLOBAL_MULTI_VALUE_SEPARATOR,
545+
$rowData[$attributeAlias]
546+
);
538547
} else {
539548
$value = $rowData[$attributeAlias];
540549
}

0 commit comments

Comments
 (0)