File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
app/code/Magento/SalesRule/Model/ResourceModel/Rule Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -156,11 +156,19 @@ public function setValidationFilter(
156
156
\Magento \SalesRule \Model \Rule::COUPON_TYPE_NO_COUPON
157
157
);
158
158
159
- $ orWhereConditions = [
159
+ $ autoGeneratedCouponCondition = [
160
160
$ connection ->quoteInto (
161
- ' ( main_table.coupon_type = ? AND rule_coupons.type = 1) ' ,
161
+ " main_table.coupon_type = ? " ,
162
162
\Magento \SalesRule \Model \Rule::COUPON_TYPE_AUTO
163
163
),
164
+ $ connection ->quoteInto (
165
+ "rule_coupons.type = ? " ,
166
+ \Magento \SalesRule \Api \Data \CouponInterface::TYPE_GENERATED
167
+ ),
168
+ ];
169
+
170
+ $ orWhereConditions = [
171
+ "( " . implode ($ autoGeneratedCouponCondition , " AND " ) . ") " ,
164
172
$ connection ->quoteInto (
165
173
'(main_table.coupon_type = ? AND main_table.use_auto_generation = 1 AND rule_coupons.type = 1) ' ,
166
174
\Magento \SalesRule \Model \Rule::COUPON_TYPE_SPECIFIC
You can’t perform that action at this time.
0 commit comments