I have a magento 2 site, with 2 different stores using different themes
1- Theme A
2- Theme B
Theme B is the child of Theme A
In the theme A checkout page, I have been able to display the payment methods, by using the base override of checkout_index_index.xml
file . Before this, payment methods were not displayed
created a file
app\design\frontend\Magento\ThemeA\Magento_Checkout\layout\override\base\checkout_index_index.xml
with the following code
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceBlock name="minicart" />
<referenceContainer name="header.panel" />
<referenceBlock name="top.search"/>
<referenceBlock name="catalog.compare.link" />
<referenceBlock name="catalog.topnav"/>
<referenceContainer name="footer-container" />
</body>
This works fine and displays the payment methods properly
For Theme B, I have tried the same approach but it does not work.
I have checked the JS
, and it returns me the proper object for the payment methods but they don't get displayed anywhere, it just shows the following message
No payment method
Best Answer
So i was able to display it
In the child theme, we have to override the parent theme files
so in Theme B, instead of
It should be
You can find a complete answer here