Inventory shortage errors not flagged when using bundle product and regular product

If this is in the wrong forum - please let me know!

Issue:

When an item has limited inventory and is added to cart, both within a Bundle and as an individual item, the available inventory is not validated when added to cart, or the checkout is opened.

Expected behaviour:

The variant, or bundle should not be added to cart - if the cart contains the variant as line items or component items and the inventory is not available

The checkout should show an inventory shortage error when the user first proceeds to checkout

Steps to repeat:

  1. Create a product with 2 inventory
    1. ‘Ashturv Gourmet Chocolates’ in the example images.
  2. Ensure it is ‘track inventory’ and ‘continue selling’ = false
  3. Create a bundle product (we’re using the expand operation)
  4. Add the bundle product to cart with both component items as the example product we created
    1. In this example, this adds a bundle with 2x components for ‘Gourmet Chocolates’
  5. Add 1x Gourmet Chocolates to cart
    1. The product adds scucessfully
    2. Now we have 3 units of the Gourmet Chocolate in cart
    3. At this point it should already error as the cart includes components above the available inventory, but it does not.
  6. Proceed to checkout
    1. The checkout loads as normal
    2. At this point it should flag the inventory shortage error
  7. Enter test payment information and proceed
    1. Only now does the checkout validate the available inventory

Product created

Products added to cart (over available inventory)

Products at checkout (over available inventory)

Error only at final payment step

Hi @AV_SL

This is a confirmed issue, we will update here when it’s been fixed.

Thanks @Nick_Wesselman Appreciate it!

Hi @AV_SL , this should be fixed now. Can you try again and confirm?

Hi @siddhantbajaj Thanks for the follow up - I really appreciate it.

This one only looks to be partially resolved. On the first call to add the product to cart, it returns the out of stock error correctly. On subsequent calls, the request succeeds and we’re back to a cart that is overstocked, and a checkout that is overstocked with no error.

Is it easier if I DM some screen recordings?
Thanks,

Anthony

I see, yes a video walkthrough would be great.