Announcement

Collapse
No announcement yet.

"Same as billing" selected by defult

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • "Same as billing" selected by defult

    Hi,

    I am trying to modify a checkout page... against everyone's advice because the page inevitably goes haywire.

    I am trying to have the "same as billing" box selected as defult on the check out page. I do not insist the shipping be the same as the billing address but visually the checkout page will seem less daunting if those fields are greyed out.

    Here is an idea of my intent: 2014-11-10_1617 - canaan_albright's library

    I found the code snippet. How should I modify it?

    function addressValidatorContinue(type)
    {
    jQuery.modal.close();
    remove_overlay("billing_info");
    if (get_Element('sameAsBilling') != 'undefined' && get_Element('sameAsBilling') != null){
    var sameAsBilling = get_Element('sameAsBilling').checked;}
    else{
    var sameAsBilling = true;}
    if (!sameAsBilling)
    remove_overlay("shipping_info");
    validShippingAddress = 1;
    check_address(type);
    }

    Thanks in advance for your help in the matter.
Working...
X