File tree 1 file changed +4
-2
lines changed
app/code/Magento/CatalogSearch/Model/Adapter/Mysql/Dynamic 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -132,11 +132,13 @@ public function getAggregation(
132
132
\Magento \Framework \Search \Dynamic \EntityStorage $ entityStorage
133
133
) {
134
134
$ 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 );
136
138
$ select ->reset (Select::COLUMNS );
137
139
$ rangeExpr = new \Zend_Db_Expr ($ this ->connection ->getIfNullSql (
138
140
$ this ->connection ->quoteInto (
139
- 'FLOOR( ' . $ valueColumn[ 1 ] . ' * ' . ( string ) $ currencyRateColumn [ 1 ] . ' / ? ) + 1 ' ,
141
+ 'FLOOR( ' . $ valueColumn . ( $ coefColumn ? ' * ' . $ coefColumn : '' ) . ' / ? ) + 1 ' ,
140
142
$ range
141
143
),
142
144
1
You can’t perform that action at this time.
0 commit comments