Skip to content

Commit df3bfae

Browse files
committed
MAGETWO-60246: [Backport] - [Github]Magento 2.1.1 Problem with change currency #6746 - for 2.1.x
1 parent fbd902a commit df3bfae

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

app/code/Magento/CatalogSearch/Model/Adapter/Mysql/Dynamic/DataProvider.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,11 +132,13 @@ public function getAggregation(
132132
\Magento\Framework\Search\Dynamic\EntityStorage $entityStorage
133133
) {
134134
$select = $this->dataProvider->getDataSet($bucket, $dimensions, $entityStorage->getSource());
135-
list ($valueColumn, $currencyRateColumn) = $select->getPart(Select::COLUMNS);
135+
$columns = $select->getPart(Select::COLUMNS);
136+
$valueColumn = $columns[0][1];
137+
$coefColumn = (isset($columns[1]) ? (string) $columns[1][1] : null);
136138
$select->reset(Select::COLUMNS);
137139
$rangeExpr = new \Zend_Db_Expr($this->connection->getIfNullSql(
138140
$this->connection->quoteInto(
139-
'FLOOR(' . $valueColumn[1] . ' * ' . (string) $currencyRateColumn[1] . ' / ? ) + 1',
141+
'FLOOR(' . $valueColumn . ($coefColumn ? ' * ' . $coefColumn : '') . ' / ? ) + 1',
140142
$range
141143
),
142144
1

0 commit comments

Comments
 (0)