Skip to content

Commit 6ea9993

Browse files
author
Bomko, Alex(abomko)
committed
Merge pull request #111 from magento-nord/merchant_beta
[NORD] Merchant beta bugfixes
2 parents 295440e + 09befed commit 6ea9993

File tree

1 file changed

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

1 file changed

+8
-3
lines changed

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

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2199,9 +2199,14 @@ private function _parseAdditionalAttributes($rowData)
21992199

22002200
$attributeNameValuePairs = explode($this->getMultipleValueSeparator(), $rowData['additional_attributes']);
22012201
foreach ($attributeNameValuePairs as $attributeNameValuePair) {
2202-
$nameAndValue = explode(self::PAIR_NAME_VALUE_SEPARATOR, $attributeNameValuePair);
2203-
if (!empty($nameAndValue)) {
2204-
$rowData[$nameAndValue[0]] = isset($nameAndValue[1]) ? $nameAndValue[1] : '';
2202+
$separatorPosition = strpos($attributeNameValuePair, self::PAIR_NAME_VALUE_SEPARATOR);
2203+
if ($separatorPosition !== false) {
2204+
$key = substr($attributeNameValuePair, 0, $separatorPosition);
2205+
$value = substr(
2206+
$attributeNameValuePair,
2207+
$separatorPosition + strlen(self::PAIR_NAME_VALUE_SEPARATOR)
2208+
);
2209+
$rowData[$key] = $value === false ? '' : $value;
22052210
}
22062211
}
22072212
return $rowData;

0 commit comments

Comments
 (0)