diff --git a/vendor/magento/module-bundle-import-export/Model/Import/Product/Type/Bundle.php b/vendor/magento/module-bundle-import-export/Model/Import/Product/Type/Bundle.php index 494c8a9bb60..a6bf8abc6da 100644 --- a/vendor/magento/module-bundle-import-export/Model/Import/Product/Type/Bundle.php +++ b/vendor/magento/module-bundle-import-export/Model/Import/Product/Type/Bundle.php @@ -586,8 +586,12 @@ class Bundle extends \Magento\CatalogImportExport\Model\Import\Product\Type\Abst $optionIds = $this->connection->fetchAssoc( $this->connection->select()->from( - $this->_resource->getTableName('catalog_product_bundle_option'), + ['bo' => $this->_resource->getTableName('catalog_product_bundle_option')], ['option_id', 'position', 'parent_id'] + )->joinLeft( + ['bov' => $this->_resource->getTableName('catalog_product_bundle_option_value')], + 'bo.option_id = bov.option_id', + ['title'] )->where( 'parent_id IN (?)', $productIds @@ -613,8 +617,10 @@ class Bundle extends \Magento\CatalogImportExport\Model\Import\Product\Type\Abst foreach ($this->_cachedOptions as $entityId => $options) { foreach ($options as $key => $option) { foreach ($optionIds as $optionId => $assoc) { - if ($assoc['position'] == $this->_cachedOptions[$entityId][$key]['index'] - && $assoc['parent_id'] == $entityId) { + if ($assoc['position'] == $this->_cachedOptions[$entityId][$key]['index'] && + $assoc['parent_id'] == $entityId && + (empty($assoc['title']) || $assoc['title'] == $this->_cachedOptions[$entityId][$key]['name']) + ) { $option['parent_id'] = $entityId; $optionValues = array_merge( $optionValues,