Skip to content

Cannot Add Group Product Item to Basket If Any Simple Products have a Default Quantity of 0 #33348

Closed
@mjflipmind

Description

@mjflipmind

Preconditions (*)

Magento 2.4

Steps to reproduce (*)

On Magneto 2.4.x on group product when trying to add it to the cart I get this error:

image

Issue relates to #24955

Issue 24955 says it relates to stock level but this doesn't seem to be true. It seems to be caused if any of these values is 0:

image

Issue is caused by this code in vendor/magento/module-grouped-product/Model/Product/Type/Grouped.php :

image

Expected result (*)

It should add the item to the basket without error.

Actual result (*)

Item is not added to basket.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions