Skip to content

Commit 0dbf4d2

Browse files
ENGCOM-2881: [Forwardport] Fix the special price expression #17799
- Merge Pull Request #17799 from mage2pratik/magento2:special-price-expression - Merged commits: 1. 14ab8ac
2 parents 9d6399e + 14ab8ac commit 0dbf4d2

File tree

1 file changed

+1
-1
lines changed
  • app/code/Magento/Catalog/Model/ResourceModel/Product/Indexer/Price/Query

1 file changed

+1
-1
lines changed

app/code/Magento/Catalog/Model/ResourceModel/Product/Indexer/Price/Query/BaseFinalPrice.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ public function getQuery(array $dimensions, string $productType, array $entityId
190190
$specialFromExpr = "{$specialFrom} IS NULL OR {$specialFromDate} <= {$currentDate}";
191191
$specialToExpr = "{$specialTo} IS NULL OR {$specialToDate} >= {$currentDate}";
192192
$specialPriceExpr = $connection->getCheckSql(
193-
"{$specialPrice} IS NOT NULL AND {$specialFromExpr} AND {$specialToExpr}",
193+
"{$specialPrice} IS NOT NULL AND ({$specialFromExpr}) AND ({$specialToExpr})",
194194
$specialPrice,
195195
$maxUnsignedBigint
196196
);

0 commit comments

Comments
 (0)