Skip to content

Increase product quantity with disabled Manage Stock when place order is failed #19482

Closed
@iGerchak

Description

@iGerchak

After failed order, Magento increase product quantity, make reindex for this product and flush cache while in the product Manage Stock in disabled

Preconditions

  1. Magento 2.2.6
  2. PayPal Express payment method

Steps to reproduce

  1. In the admin panel set for a product Manage Stock: No and Quantity: 100
  2. Place an order with this product via PayPal, but with a card that does not have enough money to pay for the order

Expected result

  1. Product Quantity is 100

Actual result

  1. Product Quantity is 101

Tech details

It happens becouse Catalog Inventory has event for sales_model_service_quote_submit_failure
how run $this->stockManagement->revertProductsSale($items, $quote->getStore()->getWebsiteId()); where $items its all items from Quote
revertProductsSale make correctItemsQty (increase) for each items (include itemd with Manage Stock in disabled)

Metadata

Metadata

Assignees

Labels

Component: CatalogInventoryFixed in 2.2.xThe issue has been fixed in 2.2 release lineFixed in 2.3.xThe issue has been fixed in 2.3 release lineIssue: Clear DescriptionGate 2 Passed. Manual verification of the issue description passedIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentReproduced on 2.2.xThe issue has been reproduced on latest 2.2 releaseReproduced on 2.3.xThe issue has been reproduced on latest 2.3 release

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions