From f4b692961b6e0a3467a22fdc6bd19e3cb2e54b28 Mon Sep 17 00:00:00 2001 From: mahsum Date: Wed, 9 Jul 2025 16:27:15 +0200 Subject: [PATCH] Bundle product price indexing not calculating tier prices correctly #30610 https://github.com/magento/magento2/issues/30610 --- .../Model/ResourceModel/Indexer/Price.php | 2 +- tier-price.patch | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 tier-price.patch diff --git a/app/code/Magento/Bundle/Model/ResourceModel/Indexer/Price.php b/app/code/Magento/Bundle/Model/ResourceModel/Indexer/Price.php index 2e9d9dab1ba07..aba6a61c1aa9b 100644 --- a/app/code/Magento/Bundle/Model/ResourceModel/Indexer/Price.php +++ b/app/code/Magento/Bundle/Model/ResourceModel/Indexer/Price.php @@ -378,7 +378,7 @@ private function prepareBundlePriceByType($priceType, array $dimensions, $entity ); $tierPrice = $connection->getCheckSql( $tierExpr . ' IS NOT NULL', - 'ROUND((1 - ' . $tierExpr . ' / 100) * ' . $price . ', 4)', + $tierExpr, 'NULL' ); $finalPrice = $connection->getLeastSql( diff --git a/tier-price.patch b/tier-price.patch new file mode 100644 index 0000000000000..4b76c5964ed96 --- /dev/null +++ b/tier-price.patch @@ -0,0 +1,17 @@ +Index: app/code/Magento/Bundle/Model/ResourceModel/Indexer/Price.php +IDEA additional info: +Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP +<+>UTF-8 +=================================================================== +diff --git a/app/code/Magento/Bundle/Model/ResourceModel/Indexer/Price.php b/app/code/Magento/Bundle/Model/ResourceModel/Indexer/Price.php +--- a/app/code/Magento/Bundle/Model/ResourceModel/Indexer/Price.php ++++ b/app/code/Magento/Bundle/Model/ResourceModel/Indexer/Price.php (date 1752070121653) +@@ -378,7 +378,7 @@ + ); + $tierPrice = $connection->getCheckSql( + $tierExpr . ' IS NOT NULL', +- 'ROUND((1 - ' . $tierExpr . ' / 100) * ' . $price . ', 4)', ++ $tierExpr, + 'NULL' + ); + $finalPrice = $connection->getLeastSql(