File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
app/code/Magento/CatalogWidget/Model/Rule/Condition Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 12
12
use Magento \Catalog \Model \ProductCategoryList ;
13
13
use Magento \Catalog \Model \ResourceModel \Product \Collection ;
14
14
use Magento \Framework \DB \Select ;
15
- use Magento \Framework \Exception \LocalizedException ;
16
15
use Magento \Store \Model \Store ;
17
- use Zend_Db_Select_Exception ;
18
16
19
17
/**
20
18
* Rule product condition data model
@@ -249,8 +247,11 @@ protected function addNotGlobalAttribute(
249
247
$ conditionCheck = $ connection ->quoteIdentifier ($ aliasStore . '.value_id ' ) . " > 0 " ;
250
248
$ conditionTrue = $ connection ->quoteIdentifier ($ aliasStore . '.value ' );
251
249
$ conditionFalse = $ connection ->quoteIdentifier ($ aliasDefault . '.value ' );
252
- $ ifSql = "IF ( $ conditionCheck, $ conditionTrue, $ conditionFalse) " ;
253
- $ joinedAttribute = new \Zend_Db_Expr ($ ifSql );
250
+ $ joinedAttribute = $ collection ->getSelect ()->getConnection ()->getCheckSql (
251
+ $ conditionCheck ,
252
+ $ conditionTrue ,
253
+ $ conditionFalse
254
+ );
254
255
} else {
255
256
$ joinedAttribute = $ aliasStore . '. ' . 'value ' ;
256
257
}
You can’t perform that action at this time.
0 commit comments