Skip to content

Add error message when attempting to add more than stock to cart #1741

@jmauzyk

Description

@jmauzyk

What are you trying to do?
In CP order edit page, when attempting to add a line item qty that is higher than the available stock, no error or warning message is produced. It simply displays the Order recalculated flash message and sets the qty to the maximum available stock, making it possible for it to go unnoticed by the admin.

What's your proposed solution?
I think it's fine to update the order and line item quantity, but a warning message should display on the line item (something like "There are only 2 {item name} items left in stock").

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