Search code examples
magento2

Magneto 2- remove default checkbox for same shipping and billing address


As there are alot of question regarding same and also have verified answers too, but it not solving my issue as ,I want to remove default check from that from on checkout page , I am using Amasty one page checkout Any help will be appreciated. Thank you


Solution

  • Overwrite:

    vendor/magento/module-checkout/view/frontend/web/template/billing-address.html

    in your custom theme:

    app/design/frontend///Magento_Checkout/web/template/billing-address.html

    And remove:

    <div class="billing-address-same-as-shipping-block field choice" data-bind="visible: canUseShippingAddress()">
        <input type="checkbox" name="billing-address-same-as-shipping"
               data-bind="checked: isAddressSameAsShipping, click: useShippingAddress, attr: {id: 'billing-address-same-as-shipping-' + getCode($parent)}"/>
        <label data-bind="attr: {for: 'billing-address-same-as-shipping-' + getCode($parent)}"><span
                data-bind="i18n: 'My billing and shipping address are the same'"></span></label>
    </div>