- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-20-2020
12:21 PM
01-20-2020
12:21 PM
Stock not decreasing when not in stock
Hello
I re-wrote two functions out of this classes to allow to order a product which is not in stock and stock management is enabled:
Magento\CatalogInventory\Model\Quote\Item\QuantityValidator Magento\CatalogInventory\Model\StockStateProvider
The quantity of a product like this is 0 - but now I'd like to decrease the count also if a order is placed.
How can I achieve that? Where is the code which handles this?
Regards
Patrick
Labels:
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-20-2020
09:15 PM
01-20-2020
09:15 PM
Re: Stock not decreasing when not in stock
Hi @patrick_tschumi,
You can use magento default feature to use back order instead on customization.
https://docs.magento.com/m2/ce/user_guide/catalog/inventory-backorders.html
I hope it will help you!
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2020
07:41 AM
01-23-2020
07:41 AM
Re: Stock not decreasing when not in stock
@patrick_tschumi How about reducing the threshold for out of stock from 0 to -10 or something which can work for you? In this way your stock will reduce as well as you'll get the orders.
- Tarandeep
Problem solved?Please give 'Kudos' and accept 'Answer as Solution'.
Problem solved?Please give 'Kudos' and accept 'Answer as Solution'.