Skip to content

Commit 0010f64

Browse files
committed
#28628: GraphQL price range numeric values
- Removed wildcard usage for price filters
1 parent 8513dfd commit 0010f64

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

app/code/Magento/Elasticsearch/SearchAdapter/Dynamic/DataProvider.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -235,11 +235,9 @@ public function prepareData($range, array $dbRanges)
235235
{
236236
$data = [];
237237
if (!empty($dbRanges)) {
238-
$lastIndex = array_keys($dbRanges);
239-
$lastIndex = $lastIndex[count($lastIndex) - 1];
240238
foreach ($dbRanges as $index => $count) {
241-
$fromPrice = $index == 1 ? '' : ($index - 1) * $range;
242-
$toPrice = $index == $lastIndex ? '' : $index * $range;
239+
$fromPrice = $index == 1 ? 0 : ($index - 1) * $range;
240+
$toPrice = $index * $range;
243241
$data[] = [
244242
'from' => $fromPrice,
245243
'to' => $toPrice,

0 commit comments

Comments
 (0)