inventory icon indicating copy to clipboard operation
inventory copied to clipboard

Fix place order error with similar sku's

Open Tjitse-E opened this issue 5 years ago • 2 comments

Description (*)

\Magento\InventoryCatalog\Model\ResourceModel\GetProductTypesBySkus::getResultKey doesn't work correctly when the skus are numerically identical (e.g. 100.00 and 100.000). This will result in an error when placing an order that will contain both of these products.

Fixed Issues (if relevant)

  1. It seems like this will fix: https://github.com/magento/magento2/issues/28662

Manual testing scenarios (*)

  1. Create products with SKU's 35.420 and 35.4200, enable MSI
  2. Add both products to the cart
  3. Try to place an order

Questions or comments

Check integration test \Magento\InventoryCatalog\Test\Integration\GetProductTypesBySkusTest::testExecuteWithSimilairNumericSkus. This test will fail without the code change in \Magento\InventoryCatalog\Model\ResourceModel\GetProductTypesBySkus::getResultKey.

Contribution checklist (*)

  • [x] Pull request has a meaningful description of its purpose
  • [x] All commits are accompanied by meaningful commit messages
  • [x] All new or changed code is covered with unit/integration tests (if applicable)
  • [ ] All automated tests passed successfully (all builds are green)

Tjitse-E avatar Nov 26 '20 15:11 Tjitse-E

@magento run all tests

sidolov avatar Dec 03 '20 21:12 sidolov

@magento run all tests

sidolov avatar Dec 06 '20 19:12 sidolov