-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Closed
Labels
Fixed in 2.2.xThe issue has been fixed in 2.2 release lineThe issue has been fixed in 2.2 release lineFixed in 2.3.xThe issue has been fixed in 2.3 release lineThe issue has been fixed in 2.3 release lineIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedGate 1 Passed. Automatic verification of issue format passedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentGate 4. Acknowledged. Issue is added to backlog and ready for developmentReproduced on 2.1.xThe issue has been reproduced on latest 2.1 releaseThe issue has been reproduced on latest 2.1 release
Description
The Magento\Payment\Model\Config\Source\Allmethods
config source model does not display every available payment method.
Preconditions
- Magento version 2.1.11, plain fresh installation
Steps to reproduce
- Enable the Cash on Delivery payment method
- Define a config field like this:
<field id="test" type="multiselect">
<label>Test case for displaying all payment methods</label>
<source_model>Magento\Payment\Model\Config\Source\Allmethods</source_model>
</field>
- Load the config field in the Magento backend
Expected result
- The enabled Cash on Delivery payment method should be visible in the config field multiselect
Actual result
- The Cash On Delivery payment method is not listed in the widget
Comments
I have tracked the source of the issue down to the app/code/Magento/Payment/Helper/Data.php::getPaymentMethodList()
method, which does not report the full list of payment methods when $asLabelValue = true
and $withGroups = true
.
The issue was apparently introduced with this commit, which does not consider that a group's $labelValues[$code]['value'] might already hold payment method information:
$labelValues[$code]['value'] = null;
This is the issue for that pull request:
And this is the issue that prompted the problematic pull request:
ebaschiera
Metadata
Metadata
Assignees
Labels
Fixed in 2.2.xThe issue has been fixed in 2.2 release lineThe issue has been fixed in 2.2 release lineFixed in 2.3.xThe issue has been fixed in 2.3 release lineThe issue has been fixed in 2.3 release lineIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedGate 1 Passed. Automatic verification of issue format passedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentGate 4. Acknowledged. Issue is added to backlog and ready for developmentReproduced on 2.1.xThe issue has been reproduced on latest 2.1 releaseThe issue has been reproduced on latest 2.1 release