cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with quantity after shipping

Problem with quantity after shipping

Hello,

usually we have only 1 product in stock so we didn't see the problem before.

But, the product quantity becomes 0 after shipping even if original quantity is greater than 2.

 

A simple test with configurable product : got 3 items for the red color.
Buying 1 of them, validate all the order and quantity in backend is 0 after that (after ship)

 

Magento version is 2.4.3

 

Thanks a lot.

4 REPLIES 4

Re: Problem with quantity after shipping

By default, that should not happen, so you must have some custom code or extension that is causing the issue. 

 

Nobody can help you without looking into your specific codebase.

 

Also, if you have multisource inventory, read this to understand the difference between quantity and salable quantity - https://www.linkedin.com/feed/update/urn:li:activity:7216048740120338432/

Founder at https://agency418.com

Re: Problem with quantity after shipping

Re: Problem with quantity after shipping

Hello @contactilo2294,

 

you're experiencing an issue where product quantity is incorrectly reduced to 0 after shipping in Magento 2.4.3, even though there is still stock available. This behavior could be caused by a few different factors, including inventory settings, stock management, or a bug.

 

Steps to Diagnose and Resolve:

 

Check Stock Settings for Configurable Products:

 

Catalog > Products > [Your Configurable Product]:

For the configurable product, make sure that the "Stock Status" and "Quantity" fields are properly set and are not linked directly to the simple product. Magento manages inventory at the simple product level for configurable products.

Inventory Tab of the simple product (e.g., red color):

Ensure that the "Manage Stock" is set to Yes and "Qty" is correctly configured for the simple product.

Check that "Out-of-Stock Threshold" is set to a sensible value (like 0).

 

Review Global Inventory Configuration:

 

Go to Stores > Configuration > Catalog > Inventory and review the following settings:

Decrement Stock When Order is Placed: This should typically be set to Yes. If it's set to No, it may cause unexpected stock behavior.

 

Display Out-of-Stock Products: Ensure this setting is configured based on how you want to handle out-of-stock products.

 

Backorders: If backorders are enabled, double-check that they are set up correctly and aren't allowing sales beyond available stock.

 

Verify Inventory Reservations: Magento 2.3+ uses the MSI (Multi-Source Inventory) system, which includes stock reservations. Sometimes, these reservations can cause unexpected behavior. Here's how to check and resolve this:

 

Run the following SQL query to see if there are pending stock reservations:

SELECT * FROM inventory_reservation WHERE sku = 'YOUR_PRODUCT_SKU';

 

  • If you find reservations that seem incorrect, you can either manually delete them or update the quantity as needed. Magento processes stock reservations based on order placement and shipment, so improper reservation handling could lead to stock errors.

Additionally, check for any reservations that were not cleared properly after shipment.

 

Check for Customizations or Extensions:

  • Review any custom modules or third-party extensions related to order processing, inventory, or stock management. Customizations to stock processing could interfere with normal inventory management in Magento.
  • Temporarily disable any extensions related to inventory or shipping to see if the issue persists.

Steps to Test:

  1. Create a new configurable product with simple products that have stock greater than 1.
  2. Place an order for 1 item, complete the checkout and shipping processes.

Check if the quantity of the simple product in the backend is correctly reduced by 1 instead of dropping to 0.

 

If the issue will be resolved, Click Kudos & Accept as a Solution.

Re: Problem with quantity after shipping

It is like an issue with the inventory settings or a possible bug. Double-check if the "deduct stock" option is correctly configured in your system. Sometimes adjusting the stock management and Custom Woodwork rules can help resolve such discrepancies.