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

asked Jul 29, 2022 at 8:22

1 Answer 1

0

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

PY Yick
2,7051 gold badge19 silver badges35 bronze badges
answered Apr 14, 2023 at 11:12

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.