Skip to content

Commit 674126d

Browse files
Robert Heisitnikov
authored andcommitted
MAGETWO-45339: Cart price rule not applied for Payment method conditions
- remove payment_method condition for cart rules
1 parent 7508f98 commit 674126d

File tree

1 file changed

+0
-11
lines changed
  • app/code/Magento/SalesRule/Model/Rule/Condition

1 file changed

+0
-11
lines changed

app/code/Magento/SalesRule/Model/Rule/Condition/Address.php

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ public function loadAttributeOptions()
6161
'base_subtotal' => __('Subtotal'),
6262
'total_qty' => __('Total Items Quantity'),
6363
'weight' => __('Total Weight'),
64-
'payment_method' => __('Payment Method'),
6564
'shipping_method' => __('Shipping Method'),
6665
'postcode' => __('Shipping Postcode'),
6766
'region' => __('Shipping Region'),
@@ -100,7 +99,6 @@ public function getInputType()
10099
return 'numeric';
101100

102101
case 'shipping_method':
103-
case 'payment_method':
104102
case 'country_id':
105103
case 'region_id':
106104
return 'select';
@@ -117,7 +115,6 @@ public function getValueElementType()
117115
{
118116
switch ($this->getAttribute()) {
119117
case 'shipping_method':
120-
case 'payment_method':
121118
case 'country_id':
122119
case 'region_id':
123120
return 'select';
@@ -146,10 +143,6 @@ public function getValueSelectOptions()
146143
$options = $this->_shippingAllmethods->toOptionArray();
147144
break;
148145

149-
case 'payment_method':
150-
$options = $this->_paymentAllmethods->toOptionArray();
151-
break;
152-
153146
default:
154147
$options = [];
155148
}
@@ -175,10 +168,6 @@ public function validate(\Magento\Framework\Model\AbstractModel $model)
175168
}
176169
}
177170

178-
if ('payment_method' == $this->getAttribute() && !$address->hasPaymentMethod()) {
179-
$address->setPaymentMethod($model->getQuote()->getPayment()->getMethod());
180-
}
181-
182171
return parent::validate($address);
183172
}
184173
}

0 commit comments

Comments
 (0)