Skip to content

Commit 7d47a61

Browse files
author
Alex Bomko
committed
MAGETWO-44779: Issue with values for custom product attribute of type text area when product is updated via import
1 parent fc7a956 commit 7d47a61

File tree

1 file changed

+7
-3
lines changed
  • app/code/Magento/CatalogImportExport/Model/Import

1 file changed

+7
-3
lines changed

app/code/Magento/CatalogImportExport/Model/Import/Product.php

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2223,9 +2223,13 @@ private function _parseAdditionalAttributes($rowData)
22232223

22242224
$attributeNameValuePairs = explode($this->getMultipleValueSeparator(), $rowData['additional_attributes']);
22252225
foreach ($attributeNameValuePairs as $attributeNameValuePair) {
2226-
$nameAndValue = explode(self::PAIR_NAME_VALUE_SEPARATOR, $attributeNameValuePair);
2227-
if (!empty($nameAndValue)) {
2228-
$rowData[$nameAndValue[0]] = isset($nameAndValue[1]) ? $nameAndValue[1] : '';
2226+
$separatorPosition = strpos($attributeNameValuePair, self::PAIR_NAME_VALUE_SEPARATOR);
2227+
if ($separatorPosition !== false) {
2228+
$key = substr($attributeNameValuePair, 0, $separatorPosition);
2229+
$rowData[$key] = substr(
2230+
$attributeNameValuePair,
2231+
$separatorPosition + strlen(self::PAIR_NAME_VALUE_SEPARATOR)
2232+
);
22292233
}
22302234
}
22312235
return $rowData;

0 commit comments

Comments
 (0)