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

 - Merge Pull Request #22453 from Nazar65/magento2:backport-issue-21960
 - Merged commits:
   1. 34b2dcc
  • Loading branch information
magento-engcom-team committed Apr 23, 2019
2 parents a1daa45 + 34b2dcc commit 30f4010
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 30f4010

Please sign in to comment.