I am trying to put Cash on delivery as a payment method at checkout. No success so far. At payment step I get a "No payment method" message.
Things I did: cleared the cache, recompiled, installed different payment modules (magento-sample, Inchoo, Braintree), and then removed them. Also I tried different combinations of settings in admin pannel (merchant country, shipping methods). I disabled all payment methods, then enabled one at a time. The browser cache is empty.
In my final struggle I went full debugging and checked the messages between the server and the client. With wireshark I discovered that the message is received from server: {"payment_methods":[{"code":"cashondelivery","title":"Cash On Delivery"}],"totals":{details_about_products_in cart}
. Then I went on jquery debug. In the picture, the data, received from server, is saved and is the same as the json above. After this function, the page gets a total refresh and the message "No payment methods is shown". Enable Onepage Checkout is enabled and desired.
How do I show Cash on delivery payment method in checkout?
Best Answer
The solution was simple: the file in the
Theme\Magento_Checkout\layout\checkout_index_index.xml
(copied from Luma theme) was wrong, thus making the error above. The solution was simple: I deleted the file and let theapp\code\Magento\Checkout\layout\checkout_index_index.xml
take the page.