Skip to content

Commit

Permalink
Fix price range buildings (regarding magento/magento2@256806a)
Browse files Browse the repository at this point in the history
  • Loading branch information
0m3r committed Nov 25, 2020
1 parent ef77814 commit 09e04e2
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions SearchAdapter/Mysql/Aggregation/Builder/Dynamic.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,13 @@ private function prepareData($data)
{
$resultData = [];
foreach ($data as $value) {
$from = is_numeric($value['from']) ? $value['from'] : '*';
$to = is_numeric($value['to']) ? $value['to'] : '*';
unset($value['from'], $value['to']);
// https://github.com/magento/magento2/commit/256806aabbb802a545393c07bc8b8135dc7126e9
// $from = is_numeric($value['from']) ? $value['from'] : '*';
// $to = is_numeric($value['to']) ? $value['to'] : '*';
// unset($value['from'], $value['to']);

$rangeName = "{$from}_{$to}";
// $rangeName = "{$from}_{$to}";
$rangeName = "{$value['from']}_{$value['to']}";
$resultData[$rangeName] = array_merge(['value' => $rangeName], $value);
}

Expand Down

0 comments on commit 09e04e2

Please sign in to comment.