Skip to content

Commit

Permalink
Layered Navigation: “Equalize product count” not working as expected
Browse files Browse the repository at this point in the history
  • Loading branch information
Nazar65 committed Apr 22, 2019
1 parent 0d99fa8 commit 34b2dcc
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 34b2dcc

Please sign in to comment.