magento/inventory

After skipping the source quantity from configurable products child variants edit, the quantity set to zero (blank)

Varshal24 opened this issue · 8 comments

Preconditions (*)

  1. Magento 2.4.5-p1
  2. Inventory 1.2.3
  3. Magento 2.4.6
  4. Inventory 1.2.4

Steps to reproduce (*)

  1. Create one or more extra sources

  2. Create configurable products

  3. Add one or more simple product

  4. Set simple product quantity using default source and save the product

    image

  5. Then go into Edit Configuration and select (Skip quantity at this time) in the Quantity per source and than save the product

    image

  6. The quantity will remove from the simple product.

    image

  7. In this inventory_source_item the entry of those products quatity will also remove.

Description (*)

The Quantity is removed from configurable products child variants. And the entry of those source_item from inventory_source_item table is removed because of that the product is showing out of stock in the front end.

Expected result (*)

  1. If we select (Skip quantity at this time) option in Quantity per source than the quantity shouldn’t have to change. It should have to be the same as before.

Actual result (*)

  1. After saving the config product with simple product selecting (Skip quantity at this time) option in Quantity per source than the simple product quantity is set to blank.

Hi @Varshal24. Thank you for your report.
To speed up processing of this issue, make sure that you provided sufficient information.
Add a comment to assign the issue: @magento I am working on this


Join Magento Community Engineering Slack and ask your questions in #github channel.

We're seeing the same issue. Has anyone found a solution to this?

same here, I logged this on the main magento branch here: magento/magento2#37433 as it affects non-MSI installations by simply overwriting the source qty of all existing children in the configurable rather than removing the source outright

This issue has been solved in the magento developer branch . These are the two commits regarding it (204131e) & (magento/magento2@1e17b1e)) .

@Varshal24 How do I apply this fix in Magento 2.4.5?

@yurirn You can fix this issue by creating an patch.

@Varshal24 I have the same problem, I saw that you said to apply a patch,

but which of the commits do I have to apply? (204131e) or (magento/magento2@1e17b1e))

can you help me?

@devphp74 You can use (204131e) to resolve the issue. However, I suggest that the best approach is to upgrade your shop to the latest version of Magento, which will automatically resolve this issue.