cancel
Showing results for 
Search instead for 
Did you mean: 

How to update product stock quantity when placing order in magento 2?

How to update product stock quantity when placing order in magento 2?

 

Can anyone help How to update product stock quantity when placing an order in Magento 2 programmatically? I am new to Magento.

4 REPLIES 4

Re: How to update product stock quantity when placing order in magento 2?

Hi @5d970acbb8c78 

I didn't get your question properly.

Magento already managed qty deduction after place order by default.

Re: How to update product stock quantity when placing order in magento 2?

No, I want to update the ordered product stock with some custom quantity.

How to get previous stockstatus and after update and saving need to get the status magento 2?

i'm working on the send the mail after restocked send notification to requested customer, i'm trying to get the previous product status i.e., Outofstock(0) and after saving the product status will check in if condition(0!=1).

 How to get Previous stock status ??

Re: How to update product stock quantity when placing order in magento 2?

Enable the Manage Stock option to control and keep track of the number of items currently in stock. Select the way you'd like to manage Backorders. Enter the Maximum Qty Allowed in Shopping Cart to determine the number of products per one order.

 

 

acesetm