Skip to content

Commit 66baef7

Browse files
authored
ENGCOM-4803: [Backport]Layered Navigation: “Equalize product count” not working as expected #22453
2 parents e913688 + 30f4010 commit 66baef7

File tree

1 file changed

+3
-6
lines changed
  • app/code/Magento/CatalogSearch/Model/Layer/Filter

1 file changed

+3
-6
lines changed

app/code/Magento/CatalogSearch/Model/Layer/Filter/Decimal.php

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -111,12 +111,9 @@ protected function _getItemsData()
111111
$from = '';
112112
}
113113
if ($to == '*') {
114-
$to = '';
114+
$to = null;
115115
}
116-
$label = $this->renderRangeLabel(
117-
empty($from) ? 0 : $from,
118-
empty($to) ? 0 : $to
119-
);
116+
$label = $this->renderRangeLabel(empty($from) ? 0 : $from, $to);
120117
$value = $from . '-' . $to;
121118

122119
$data[] = [
@@ -141,7 +138,7 @@ protected function _getItemsData()
141138
protected function renderRangeLabel($fromPrice, $toPrice)
142139
{
143140
$formattedFromPrice = $this->priceCurrency->format($fromPrice);
144-
if ($toPrice === '') {
141+
if ($toPrice === null) {
145142
return __('%1 and above', $formattedFromPrice);
146143
} else {
147144
if ($fromPrice != $toPrice) {

0 commit comments

Comments
 (0)