Skip to content

Add Product Quantities doubled in Backend Order Creation #45

@nige-one

Description

@nige-one

Backend

  • Magento version: 2.4.6-p3
  • Module version: 1.3.2

Settings / Sale Rules

  1. Have a example rule that will trigger

Steps to reproduce

  1. Create a backend order
  2. Add a product
  3. Qty will be doubled if freeproduct rule will be triggered (causing "not available" for stock = 1 products)

Expected result

  1. My added product will be added with the configured amount

Actual result

  1. Added products have double qty in backend order

This only applies for backend orders. The issue comes from commit e7d3e96. If quote items are set "again" from the quotes items collection, the following quote repo save operation will trigger a second addProduct on the quote for the items set resulting in an update on the item's qty with the qty of the initial request.

After commenting out the lines in the mentioned commit, everything seems to work fine again. Maybe this is some 2.4.6-p3 thing, I didn't test intensivly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions