0

Magento 2 version 2.2.6 will not import more than 1 product at a time.

The import will not create, update, or delete.

I've checked the import history, but there are no errors. I've validated the files also and imported the CSV successfully.

However, it doesn't look like any data were written to the database.

Any help is appreciated.

enter image description here

enter image description here

enter image description here

1 Answer 1

0
$product = $observer->getProduct();
$product->setStockData(['qty' => $yourQty, 'is_in_stock' => 1]);
$product->setQuantityAndStockStatus(['qty' => $yourQty, 'is_in_stock' => 1]);

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.