Skip to content

Min qty validation error in admin panel for bundle products #40812

@taurus-media

Description

@taurus-media

Preconditions and environment

  • Magento version 2.4.9
  • A bundle product where a linked simple product has Min Sale Qty > 1

Steps to reproduce

  1. Create simple product with 'Minimum Qty Allowed in Shopping Cart' = 3
  2. Create a bundle product and add the previously created simple product to it with default qty = 5
  3. Start creating a new order in admin panel
  4. Add the bundle product to quote with qty = 1

Expected result

The bundle product is added without any errors

Actual result

Error message:

The fewest you may purchase is 3

Additional information

The issue is in the Magento\Sales\Block\Adminhtml\Order\Create\Items\Grid::getItems() method. When validating the stock qty, it is taking the simple product's ID but validates it for the bundle's qty.

Release note

No response

Triage and priority

  • Severity: S0 - Affects critical data or functionality and leaves users without workaround.
  • Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
  • Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
  • Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
  • Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area: OrderComponent: Order gridIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedPriority: P2A defect with this priority could have functionality issues which are not to expectations.Reported on 2.4.9Reproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branch

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status

    Ready for Development

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions