Skip to content

Commit

Permalink
Merge branch 'MAGETWO-43336' of github.corp.magento.com:magento-troll…
Browse files Browse the repository at this point in the history
…/magento2ce into MAGETWO-43336
  • Loading branch information
Egor Shitikov committed Nov 2, 2015
2 parents 894de50 + d9d39c4 commit d1b250c
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions app/code/Magento/CatalogImportExport/Model/Import/Product.php
Original file line number Diff line number Diff line change
Expand Up @@ -2223,9 +2223,14 @@ private function _parseAdditionalAttributes($rowData)

$attributeNameValuePairs = explode($this->getMultipleValueSeparator(), $rowData['additional_attributes']);
foreach ($attributeNameValuePairs as $attributeNameValuePair) {
$nameAndValue = explode(self::PAIR_NAME_VALUE_SEPARATOR, $attributeNameValuePair);
if (!empty($nameAndValue)) {
$rowData[$nameAndValue[0]] = isset($nameAndValue[1]) ? $nameAndValue[1] : '';
$separatorPosition = strpos($attributeNameValuePair, self::PAIR_NAME_VALUE_SEPARATOR);
if ($separatorPosition !== false) {
$key = substr($attributeNameValuePair, 0, $separatorPosition);
$value = substr(
$attributeNameValuePair,
$separatorPosition + strlen(self::PAIR_NAME_VALUE_SEPARATOR)
);
$rowData[$key] = $value === false ? '' : $value;
}
}
return $rowData;
Expand Down

0 comments on commit d1b250c

Please sign in to comment.