So you just changed your product sku from 116a to 116A. When you go to the product page and click on add to cart it says “There are no source items with the in stock status.” Now you will be wondering as to why this error comes up. You are on the lastest codes and you know this known error was fixed and added to magento 2.4.9 still why are you getting the error ? ACSD-69325 — “Modifying the SKU case caused the product to appear out-of-stock on the storefront.” this is the exact issue which was reported and fixed but still you are getting the error. What to do ?
The main reason you are still getting this error is because of this file which is under vendor/magento/module-inventory-sales/Model/ResourceModel/GetProductAvailableQtyBySkuList.php
Where
$result = array_fill_keys($skus, null);
foreach ($connection->fetchAll($select) as $item) {
if ($item[‘count’] > 0) {
$result[$item[‘sku’]] = (float) $item[‘quantity’];
}
}
results
[
‘116A’ => null,
‘116a’ => 60
]
Solution to create custom module and update this to
$normalizedResults = [];
foreach ($result as $sku => $value) {
$normalizedResults[
mb_strtolower((string) $sku, 'UTF-8')
] = $value;
}
$finalResult = [];
foreach ($originalSkus as $originalSku) {
$normalizedSku = mb_strtolower($originalSku, 'UTF-8');
$finalResult[$originalSku] =
$normalizedResults[$normalizedSku] ?? null;
}
return $finalResult;
Same as which was patched by magento in vendor/magento/module-inventory-indexer/Model/ResourceModel/GetStockItemsData.php

2X Certified Adobe Magento Commerce with 10+ years’ experience in Magento platform
