File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed
CatalogImportExport/Model/Import Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -3412,7 +3412,11 @@ private function formatStockDataForRow(array $rowData): array
34123412 }
34133413
34143414 if ($ this ->stockConfiguration ->isQty ($ this ->skuProcessor ->getNewSku ($ sku )['type_id ' ])) {
3415- $ initialStatusStock = $ existStockData ['is_in_stock ' ] ?? $ this ->defaultStockData ['is_in_stock ' ];
3415+ if (empty ($ existStockData )) {
3416+ $ initialStatusStock = 0 ;
3417+ } else {
3418+ $ initialStatusStock = $ existStockData ['is_in_stock ' ] ?? $ this ->defaultStockData ['is_in_stock ' ];
3419+ }
34163420 unset($ existStockData ['is_in_stock ' ]);
34173421
34183422 $ row = $ this ->getMergedRowDetails ($ row , $ existStockData , $ rowData );
Original file line number Diff line number Diff line change @@ -76,7 +76,10 @@ public function __construct(
7676 */
7777 public function verifyStock (StockItemInterface $ stockItem )
7878 {
79- if ($ stockItem ->getQty () === null && $ stockItem ->getManageStock ()) {
79+ if ((int ) $ stockItem ->getQty () === 0 &&
80+ $ stockItem ->getManageStock () &&
81+ $ stockItem ->getBackorders () == StockItemInterface::BACKORDERS_NO
82+ ) {
8083 return false ;
8184 }
8285 if ($ stockItem ->getBackorders () == StockItemInterface::BACKORDERS_NO
You can’t perform that action at this time.
0 commit comments