inventory
inventory copied to clipboard
Fix place order error with similar sku's
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)
- It seems like this will fix: https://github.com/magento/magento2/issues/28662
Manual testing scenarios (*)
- Create products with SKU's 35.420 and 35.4200, enable MSI
- Add both products to the cart
- 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)
@magento run all tests
@magento run all tests