2

It seems that many of our customers are not smart enough to figure this out so we have to make the "Ship to different address" option default (checked - the radio button). This is in STEP 1 of the Checkout (1 BILLING INFORMATION)

What is the best way to do that? Thanks for any suggestions! :-*


Edited on June 1st, 2018:

I have implemented the solution below and it worked great.

Now, however, all of sudden - it reverts back to "Ship to this address" again. I went into the billing.phtml file in

/public_html/app/design/frontend/base/default/template/persistent/checkout/onepage 

and the code is still the correct one (the changed one). Would anyone know why this just stopped working all of a sudden by itself? (the file was not overwritten)

  • 1
    you can change the code in persistent/checkout/onepage/billing.phtml to make the option checked by default – saravanavelu Jul 8 '15 at 20:34
  • Thank you saravanavelu! you are correct - I changed checked = false to checked = true and checked = true to checked = false and that did the trick! – Allysin Jul 8 '15 at 21:15
  • @saravanavelu I made this change and it worked. Then, all of sudden - it reverts back to "Ship to this address" again. I went into the billing.phtml file in '/public_html/app/design/frontend/base/default/template/persistent/checkout/onepage and the code is still the correct one (the changed one). Would anyone know why this just stopped working all of a sudden by itself? (the file was not overwritten) – Allysin Jun 1 '18 at 16:06
2

Just as saravanavelu says:

Edit 'billing.phtml' in

/public_html/app/design/frontend/base/default/template/persistent/checkout/onepage

Change this:

<li class="control">
            <input type="radio" name="billing[use_for_shipping]" id="billing:use_for_shipping_yes" value="1"<?php if ($this->isUseBillingAddressForShipping()) {?> checked="checked"<?php }?> title="<?php echo  $this->__('Ship to this address') ?>" onclick="$('shipping:same_as_billing').checked = true;" class="radio" /><label for="billing:use_for_shipping_yes"><?php echo  $this->__('Ship to this address') ?></label></li>
        <li class="control">
            <input type="radio" name="billing[use_for_shipping]" id="billing:use_for_shipping_no" value="0"<?php if (!$this->isUseBillingAddressForShipping()) {?> checked="checked"<?php }?> title="<?php echo $this->__('Ship to different address') ?>" onclick="$('shipping:same_as_billing').checked = false;" class="radio" /><label for="billing:use_for_shipping_no"><?php echo $this->__('Ship to different address') ?></label>
        </li>

TO THIS:

<li class="control">
            <input type="radio" name="billing[use_for_shipping]" id="billing:use_for_shipping_yes" value="1"<?php if ($this->isUseBillingAddressForShipping()) {?> checked="checked"<?php }?> title="<?php echo  $this->__('Ship to this address') ?>" onclick="$('shipping:same_as_billing').checked = false;" class="radio" /><label for="billing:use_for_shipping_yes"><?php echo  $this->__('Ship to this address') ?></label></li>
        <li class="control">
            <input type="radio" name="billing[use_for_shipping]" id="billing:use_for_shipping_no" value="0"<?php if (!$this->isUseBillingAddressForShipping()) {?> checked="checked"<?php }?> title="<?php echo $this->__('Ship to different address') ?>" onclick="$('shipping:same_as_billing').checked = true;" class="radio" /><label for="billing:use_for_shipping_no"><?php echo $this->__('Ship to different address') ?></label>
        </li>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.