0

I want to change billing address drop down in checkout page similar to shipping address view list template. I have tried the following code in

app\design\frontend....\Magento_Checkout\web\template\billing-address\list.html

<!--
/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */
-->
<div class="field field-select-billing">
    <label class="label"><span data-bind="i18n: 'Billing Address'"></span></label>
    <div class="control" data-bind="forach: addressOptions">
        <input type="radio" data-bind="attr:{value: 'selectedAddress',id:customerAddressId}"/>
        <label class="label" data-bind="attr:{for:customerAddressId}">
            <span data-bind="text:addressOptionsText"></span>
        </label>
    </div>
</div>

I am getting console error :

Uncaught ReferenceError: Unable to process binding "attr: function(){return {value:'selectedAddress',id:customerAddressId} }"
Message: customerAddressId is not defined

My goal is to achieve the same template as in shipping address in checkout .Please help.Thanks in Advance

2 Answers 2

0

Use selectedAddress().customerAddressId to get the id of selected address

-1

Can you little bit explain what you want. So I can help you.

1
  • In magento 2.4 checkout page the Shipping Addresses are displayed in list view with radio buttons where as in billing address section we have to select from a dropdown of addresses with last option as new address in the dropdown.I want to change this behavior and make it same as how it displays the shipping addresses in one page checkout .Hope you got the idea.
    – Melvin
    Aug 2, 2022 at 10:33

Your Answer

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

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