Skip to content

Commit

Permalink
ENGCOM-4803: [Backport]Layered Navigation: “Equalize product count” n…
Browse files Browse the repository at this point in the history
…ot working as expected #22453
  • Loading branch information
sidolov authored Apr 23, 2019
2 parents e913688 + 30f4010 commit 66baef7
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions app/code/Magento/CatalogSearch/Model/Layer/Filter/Decimal.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,12 +111,9 @@ protected function _getItemsData()
$from = '';
}
if ($to == '*') {
$to = '';
$to = null;
}
$label = $this->renderRangeLabel(
empty($from) ? 0 : $from,
empty($to) ? 0 : $to
);
$label = $this->renderRangeLabel(empty($from) ? 0 : $from, $to);
$value = $from . '-' . $to;

$data[] = [
Expand All @@ -141,7 +138,7 @@ protected function _getItemsData()
protected function renderRangeLabel($fromPrice, $toPrice)
{
$formattedFromPrice = $this->priceCurrency->format($fromPrice);
if ($toPrice === '') {
if ($toPrice === null) {
return __('%1 and above', $formattedFromPrice);
} else {
if ($fromPrice != $toPrice) {
Expand Down

0 comments on commit 66baef7

Please sign in to comment.