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
3412
3412
}
3413
3413
3414
3414
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
+ }
3416
3420
unset($ existStockData ['is_in_stock ' ]);
3417
3421
3418
3422
$ row = $ this ->getMergedRowDetails ($ row , $ existStockData , $ rowData );
Original file line number Diff line number Diff line change @@ -76,7 +76,10 @@ public function __construct(
76
76
*/
77
77
public function verifyStock (StockItemInterface $ stockItem )
78
78
{
79
- if ($ stockItem ->getQty () === null && $ stockItem ->getManageStock ()) {
79
+ if ((int ) $ stockItem ->getQty () === 0 &&
80
+ $ stockItem ->getManageStock () &&
81
+ $ stockItem ->getBackorders () == StockItemInterface::BACKORDERS_NO
82
+ ) {
80
83
return false ;
81
84
}
82
85
if ($ stockItem ->getBackorders () == StockItemInterface::BACKORDERS_NO
You can’t perform that action at this time.
0 commit comments