Hi
I'm working on a Magento 2.3 website. In which I'm working on a cron job, that automatically generates shipping and invoice based on the details from some XML files. But its not possible to generate shipping if any of the products in that particular order has stock value is 0. It throws an error. I want to generate shipping even if stock of product is zero.
Thanks in advance.
Hello @avitha
You can refer https://docs.magento.com/m2/ce/user_guide/catalog/inventory.html for the solution. But note that it will affect your entire store.
Thanks.
Hi @Meetanshi
Thanks for reply.
But this is not possible as its already set Backorders as Allow Qty Below 0, so that the products with stock zero to list in frontend.
Is it possible to set by code manually, before executing shipping createShipment() method?
Thanks
Hello @avitha
If you are using the latest Magento 2 version, the MSI functionality will solve your issue.
Else, the solution is to set No manage stock.
You may refer the below guide:
https://devdocs.magento.com/guides/v2.3/inventory/
Hope it helps.
HI @Meetanshi
I am using the latest version of magento2. How can we ship out of stock products in it? How can we achieve the same with MSI enbaled?
Hi,
This module allows creation of shipments for orders including out of stock items.
https://github.com/scriptbaker/magento2-ship-out-of-stock-items