Magento Pre Select payment method as Card on delivery in one page checkout

2.8k Views Asked by At

I want to show the payment method with the cash on delivery option already selected when the customer comes to the payment option so if they want to use COD they can just proceed to next step and if they want to change they can choose their desired payment options. I don't know how to achieve this and I tried google but no help at all. Please help.

1

There are 1 best solutions below

8
On

Just Use Jquery....

  1. Inspect the element
  2. Find the Class or ID
  3. Check the button by default when the page loads

for eg, if the id of the radio button is "payment_cash_on_delivery",

$("#payment_cash_on_delivery").prop( "checked", true );

include this script in the checkout template or in the footer.

UPDATE

jQuery(document).ready(function() {
 jQuery("#payment_cash_on_delivery").prop( "checked", true );
});