Closed ZIPITRO closed 2 years ago
HII @ZIPITRO ,
Thanks for opening this issue. The payment method extends from the Magento_Checkout/js/view/payment/default
component, which implements the sort order. The issue you describe is something we can’t change due to how Magento builds the payment method list.
It will first retrieve the available payment methods from the backend. Then, when you change the country, it will retrieve the payment methods again. Any new methods that are new are now appended to this existing list, which gives this issue.
The functionality responsible for this behavior is located in Magento_Checkout::js/view/payment/list.js
in the createRenderer
method.
As this is more a Magento issue, we are closing this issue now but please feel free to reopen the issue if this still occurs.
Describe the new feature
When changing a country in the checkout, you will have a certain available payment methods available per country. For example: The Netherlands have iDeal and not Bancontact for example, so choosing the country Belgium removes iDeal. Re-selecting Netherlands will add Ideal as payment method, but below the other payment methods, it does not remember its sort order is 1 for example.
Describe the solution to be implemented
Would be nice to see that in method-renderer.js the extend is using the sort_order given per payment method.
Or maybe it needs to be defined somewhere else, but I don't know the module inside out.
Thanks!