Magento 1 - Select "Checkout as Guest" and "Ship to this Address" by default

Posted on May 09, 2011 | Magento 1

In order to set these defaults, you need to modify the opcheckout.js file located at:

frontend/base/default/js/opcheckout.js

Add this code to the end of the initialize function:

initialize: function(accordion, urls){
...
// Set guest checkout by default
if ($('login:guest')) $('login:guest').checked=true;
 
// Set shipping = billing by default
if ($('billing:use_for_shipping_yes')) $('billing:use_for_shipping_yes').checked=true;
},