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 1212use Magento \Catalog \Model \ProductCategoryList ;
1313use Magento \Catalog \Model \ResourceModel \Product \Collection ;
1414use Magento \Framework \DB \Select ;
15- use Magento \Framework \Exception \LocalizedException ;
1615use Magento \Store \Model \Store ;
17- use Zend_Db_Select_Exception ;
1816
1917/**
2018 * Rule product condition data model
@@ -249,8 +247,11 @@ protected function addNotGlobalAttribute(
249247 $ conditionCheck = $ connection ->quoteIdentifier ($ aliasStore . '.value_id ' ) . " > 0 " ;
250248 $ conditionTrue = $ connection ->quoteIdentifier ($ aliasStore . '.value ' );
251249 $ 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+ );
254255 } else {
255256 $ joinedAttribute = $ aliasStore . '. ' . 'value ' ;
256257 }
You can’t perform that action at this time.
0 commit comments