Skip to content

Commit 401c1fe

Browse files
committed
ACP2E-982: Assignment of sources changes after importing data
1 parent 2e45de7 commit 401c1fe

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2336,6 +2336,7 @@ protected function _saveStockItem()
23362336
$stockItem = $this->getRowExistingStockItem($rowData);
23372337
$existingStockItemData = $stockItem->getData();
23382338
$row = $this->formatStockDataForRow($rowData);
2339+
$row['explicit_qty'] = array_key_exists('qty', $rowData);
23392340
$productIdsToReindex[] = $row['product_id'];
23402341
$storeId = $this->getRowStoreId($rowData);
23412342
if (!empty(array_diff_assoc($row, $existingStockItemData))

app/code/Magento/CatalogImportExport/Model/StockItemImporter.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ public function import(array $stockData)
5050
$entityTable = $stockItemResource->getMainTable();
5151
try {
5252
$stockImportData = array_map(
53-
function ($stockItemData) {
54-
unset($stockItemData['sku']);
53+
static function ($stockItemData) {
54+
unset($stockItemData['sku'], $stockItemData['explicit_qty']);
5555
return $stockItemData;
5656
},
5757
array_values($stockData)

0 commit comments

Comments
 (0)