Skip to content

Commit 069509a

Browse files
authored
Merge pull request #1345 from magento-firedrakes/MAGETWO-58051
Fixed issues: - MAGETWO-58051 bundle_values required for import
2 parents fb95956 + adc469b commit 069509a

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
@@ -167,6 +167,10 @@ public function __construct(
167167
*/
168168
protected function parseSelections($rowData, $entityId)
169169
{
170+
if (empty($rowData['bundle_values'])) {
171+
return [];
172+
}
173+
170174
$rowData['bundle_values'] = str_replace(
171175
self::BEFORE_OPTION_VALUE_DELIMITER,
172176
$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
@@ -309,6 +309,11 @@ public function testSaveDataProvider()
309309
'bunch' => ['bundle_values' => 'value1', 'sku' => 'sku', 'name' => 'name'],
310310
'allowImport' => false
311311
],
312+
'Import without bundle values' => [
313+
'skus' => ['newSku' => ['sku' => ['sku' => 'sku', 'entity_id' => 3, 'type_id' => 'bundle']]],
314+
'bunch' => ['sku' => 'sku', 'name' => 'name'],
315+
'allowImport' => true,
316+
],
312317
[
313318
'skus' => ['newSku' => [
314319
'sku' => ['sku' => 'sku', 'entity_id' => 3, 'type_id' => 'bundle'],

0 commit comments

Comments
 (0)