2

How can I show unchecked Save in address book at checkout when adding new shipping address?

Please suggest me.

enter image description here

1 Answer 1

4

I don't know which onestepcheckout you are using. But you can check in core checkout how it works refer below files

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

    <!-- ko if: (isCustomerLoggedIn) -->
    <div class="field choice" data-bind="visible: !isFormInline">
        <input type="checkbox" class="checkbox" id="shipping-save-in-address-book" data-bind="checked: saveInAddressBook" />
        <label class="label" for="shipping-save-in-address-book">
            <span data-bind="i18n: 'Save in address book'"></span>
        </label>
    </div>
    <!-- /ko -->

In above code the checkbox value is bind data-bind="checked: saveInAddressBook" /> This value is set in shipping.js file

vendor/magento/module-checkout/view/frontend/web/js/view/shipping.js

    isNewAddressAdded: ko.observable(false),
    saveInAddressBook: 1, //Change this value to 0

Redeploy your static content

clear cache and check

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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