Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Layered Navigation: “Equalize product count” not working as expected #21968

Merged
merged 2 commits into from
Apr 20, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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