During Check out process, In the dropdown, we are getting All the billing and shipping address, But I need to display only a particular shipping address from the address book in the dropdown, Is it possible.
Solved! Go to Solution.
Hello @raju_a
vendor/magento/module-checkout/view/frontend/web/js/view/billing-address.js
addressOptions = addressList().filter(function (address) { return address.getType() == 'customer-address'; //eslint-disable-line eqeqeq });
here you need to add condition
e.g
addressOptions = addressList().filter(function (address) { if(address.id =2012){ return address.getType() == 'customer-address'; //eslint-disable-line eqeqeq }else{ return false; } });
hope you know how to deploy and all thing
if it will help you then mark as solution
Hello @raju_a
i can not able to see your image.
can you please share via some online tool?
Hello @raju_a
vendor/magento/module-checkout/view/frontend/web/js/view/billing-address.js
addressOptions = addressList().filter(function (address) { return address.getType() == 'customer-address'; //eslint-disable-line eqeqeq });
here you need to add condition
e.g
addressOptions = addressList().filter(function (address) { if(address.id =2012){ return address.getType() == 'customer-address'; //eslint-disable-line eqeqeq }else{ return false; } });
hope you know how to deploy and all thing
if it will help you then mark as solution
Thank you very much, I'll try this