Skip to content

Commit 5f03957

Browse files
author
Dmytro Voskoboinikov
committed
MAGETWO-71982: bundle_values required for import - for 2.2
1 parent 4381a6b commit 5f03957

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

app/code/Magento/BundleImportExport/Model/Import/Product/Type/Bundle.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,10 @@ public function __construct(
168168
*/
169169
protected function parseSelections($rowData, $entityId)
170170
{
171+
if (empty($rowData['bundle_values'])) {
172+
return [];
173+
}
174+
171175
$rowData['bundle_values'] = str_replace(
172176
self::BEFORE_OPTION_VALUE_DELIMITER,
173177
$this->_entityModel->getMultipleValueSeparator(),

app/code/Magento/BundleImportExport/Test/Unit/Model/Import/Product/Type/BundleTest.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,11 @@ public function saveDataProvider()
294294
'bunch' => ['bundle_values' => 'value1', 'sku' => 'sku', 'name' => 'name'],
295295
'allowImport' => false
296296
],
297+
'Import without bundle values' => [
298+
'skus' => ['newSku' => ['sku' => ['sku' => 'sku', 'entity_id' => 3, 'type_id' => 'bundle']]],
299+
'bunch' => ['sku' => 'sku', 'name' => 'name'],
300+
'allowImport' => true,
301+
],
297302
[
298303
'skus' => ['newSku' => [
299304
'sku' => ['sku' => 'sku', 'entity_id' => 3, 'type_id' => 'bundle'],

0 commit comments

Comments
 (0)