Magento 2 : Default billing address not selected by default on checkout page Planned maintenance scheduled April 23, 2019 at 00:00UTC (8:00pm US/Eastern) Announcing the arrival of Valued Associate #679: Cesar Manara Unicorn Meta Zoo #1: Why another podcast?M2.2.4 Checkout: Adding New Shipping Address automatically sets address as Billing AddressHow to restrict onepage checkout to not load address same as billing when select “Ship to different address” on frontend?How to check billing and shipping address are sameMove billing address form to shipping address page in magento 2.1Move “My billing and shipping address are the same” to shipping sectionMagento 2 : Remove Billing Address From Payment Step in CheckoutChange default behaviour for address selection in checkoutMagento2 remove some addresses on checkout page when selecting shipping addressMagento 2 Setting a address as DefaultM2.2.4 Checkout: Adding New Shipping Address automatically sets address as Billing AddressMagento 2 how to dispaly billing address in opc-sidebar in checkout page
The code below, is it ill-formed NDR or is it well formed?
How often does castling occur in grandmaster games?
Why do we bend a book to keep it straight?
Trademark violation for app?
How to write this math term? with cases it isn't working
Do wooden building fires get hotter than 600°C?
Illegal assignment from sObject to Id
What does it mean that physics no longer uses mechanical models to describe phenomena?
What's the meaning of "fortified infraction restraint"?
How does the math work when buying airline miles?
How do living politicians protect their readily obtainable signatures from misuse?
What is the appropriate index architecture when forced to implement IsDeleted (soft deletes)?
How much damage would a cupful of neutron star matter do to the Earth?
Why is the AVR GCC compiler using a full `CALL` even though I have set the `-mshort-calls` flag?
AppleTVs create a chatty alternate WiFi network
Can a new player join a group only when a new campaign starts?
How to tell that you are a giant?
Is there a kind of relay only consumes power when switching?
How to compare two different files line by line in unix?
Most bit efficient text communication method?
Can anything be seen from the center of the Boötes void? How dark would it be?
When a candle burns, why does the top of wick glow if bottom of flame is hottest?
How come Sam didn't become Lord of Horn Hill?
How to install press fit bottom bracket into new frame
Magento 2 : Default billing address not selected by default on checkout page
Planned maintenance scheduled April 23, 2019 at 00:00UTC (8:00pm US/Eastern)
Announcing the arrival of Valued Associate #679: Cesar Manara
Unicorn Meta Zoo #1: Why another podcast?M2.2.4 Checkout: Adding New Shipping Address automatically sets address as Billing AddressHow to restrict onepage checkout to not load address same as billing when select “Ship to different address” on frontend?How to check billing and shipping address are sameMove billing address form to shipping address page in magento 2.1Move “My billing and shipping address are the same” to shipping sectionMagento 2 : Remove Billing Address From Payment Step in CheckoutChange default behaviour for address selection in checkoutMagento2 remove some addresses on checkout page when selecting shipping addressMagento 2 Setting a address as DefaultM2.2.4 Checkout: Adding New Shipping Address automatically sets address as Billing AddressMagento 2 how to dispaly billing address in opc-sidebar in checkout page
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I am using Magento 2.0.7 and my default billing and shipping address are different in My account Address section.
When I am going on checkout page my default shipping address selected by default and I move on payment section but on payment section My shipping address by default set as billing address.
I already mention default billing address then how we get that address selected by default ?
magento2 checkout shipping-address billing-address
bumped to the homepage by Community♦ 13 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
I am using Magento 2.0.7 and my default billing and shipping address are different in My account Address section.
When I am going on checkout page my default shipping address selected by default and I move on payment section but on payment section My shipping address by default set as billing address.
I already mention default billing address then how we get that address selected by default ?
magento2 checkout shipping-address billing-address
bumped to the homepage by Community♦ 13 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
Hi did you get a solution for this?
– Geethika Antony
Mar 16 '17 at 4:54
Hi Ashish, I face some different kind of problem but If you can write the solution of this than it's may be its help full.
– jaydip sinh Parmar
Sep 12 '17 at 6:55
add a comment |
I am using Magento 2.0.7 and my default billing and shipping address are different in My account Address section.
When I am going on checkout page my default shipping address selected by default and I move on payment section but on payment section My shipping address by default set as billing address.
I already mention default billing address then how we get that address selected by default ?
magento2 checkout shipping-address billing-address
I am using Magento 2.0.7 and my default billing and shipping address are different in My account Address section.
When I am going on checkout page my default shipping address selected by default and I move on payment section but on payment section My shipping address by default set as billing address.
I already mention default billing address then how we get that address selected by default ?
magento2 checkout shipping-address billing-address
magento2 checkout shipping-address billing-address
edited Feb 9 '17 at 7:25
Ashish Jagnani
asked Oct 4 '16 at 4:52
Ashish JagnaniAshish Jagnani
4,59721956
4,59721956
bumped to the homepage by Community♦ 13 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
bumped to the homepage by Community♦ 13 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
Hi did you get a solution for this?
– Geethika Antony
Mar 16 '17 at 4:54
Hi Ashish, I face some different kind of problem but If you can write the solution of this than it's may be its help full.
– jaydip sinh Parmar
Sep 12 '17 at 6:55
add a comment |
Hi did you get a solution for this?
– Geethika Antony
Mar 16 '17 at 4:54
Hi Ashish, I face some different kind of problem but If you can write the solution of this than it's may be its help full.
– jaydip sinh Parmar
Sep 12 '17 at 6:55
Hi did you get a solution for this?
– Geethika Antony
Mar 16 '17 at 4:54
Hi did you get a solution for this?
– Geethika Antony
Mar 16 '17 at 4:54
Hi Ashish, I face some different kind of problem but If you can write the solution of this than it's may be its help full.
– jaydip sinh Parmar
Sep 12 '17 at 6:55
Hi Ashish, I face some different kind of problem but If you can write the solution of this than it's may be its help full.
– jaydip sinh Parmar
Sep 12 '17 at 6:55
add a comment |
2 Answers
2
active
oldest
votes
You could do the following:
- overwrite a default js file checkout-data-resolver.js
- add extra lines to the applyBillingAddress function to check if default
billing address exists and if true to use it
step 1. Overwritting a default magento checkout-data-resolver.js
1.1 Create your module. YourCompanyCheckout
1.2 Add file appcodeYourCompanyCheckoutviewfrontendrequirejs-config.js
with following content
var config =
map:
'*':
'Magento_Checkout/js/model/checkout-data-resolver':
'YourCompany_Checkout/js/model/checkout-data-resolver'
;
- 1.3 Copy magento file vendormagentomodule-checkoutviewfrontendwebjsmodelcheckout-data-resolver.js
to the destination
appcodeYourCompanyCheckoutviewfrontendwebjsmodelcheckout-data-resolver.js
step 2. Modify applyBillingAddress function
2.1 in new checkout-data-resolver.js file find applyBillingAddress. Insert following cod after var shippingAddress;
and before if (quote.billingAddress())
....
var isBillingAddressInitialized;
isBillingAddressInitialized = addressList.some(function (addressFromList)
if (addressFromList.isDefaultBilling())
selectBillingAddress(addressFromList);
return true;
return false;
);
if(isBillingAddressInitialized)
return;
....
This code actually goes through customer addresses and checks if any of them has defaultBilling set to true. If such an address exists it will be used as the billing address. If not the script will fall back to the default magento behavior
I'm running into a similar issue, but only when I add a new address in the shipping step prior to going to the payment step, it ends up taking the new shipping address and automatically changing the default billing address to the new shipping address. Any idea what could cause that? I tried this fix, however the issue persists.
– ne0nlight
Oct 10 '18 at 19:40
add a comment |
I got solution of this problem.
please check your theme override file:
/app/design/frontend/Vendor/your-theme/Magento_Checkout/web/js/view/shipping.js
in this file checkout your custom code on line no 114 or may be change of this line your file. So, checkout this function
initialize: function ()
Inside this function check following code
registry.async('checkoutProvider')(function (checkoutProvider)
//////////
Your Code
/////////
);
from this jQuery remove your custom code or update with new code.
hope it will work for you. In my case it is working for me after update this function.
Thanks
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "479"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f139195%2fmagento-2-default-billing-address-not-selected-by-default-on-checkout-page%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
You could do the following:
- overwrite a default js file checkout-data-resolver.js
- add extra lines to the applyBillingAddress function to check if default
billing address exists and if true to use it
step 1. Overwritting a default magento checkout-data-resolver.js
1.1 Create your module. YourCompanyCheckout
1.2 Add file appcodeYourCompanyCheckoutviewfrontendrequirejs-config.js
with following content
var config =
map:
'*':
'Magento_Checkout/js/model/checkout-data-resolver':
'YourCompany_Checkout/js/model/checkout-data-resolver'
;
- 1.3 Copy magento file vendormagentomodule-checkoutviewfrontendwebjsmodelcheckout-data-resolver.js
to the destination
appcodeYourCompanyCheckoutviewfrontendwebjsmodelcheckout-data-resolver.js
step 2. Modify applyBillingAddress function
2.1 in new checkout-data-resolver.js file find applyBillingAddress. Insert following cod after var shippingAddress;
and before if (quote.billingAddress())
....
var isBillingAddressInitialized;
isBillingAddressInitialized = addressList.some(function (addressFromList)
if (addressFromList.isDefaultBilling())
selectBillingAddress(addressFromList);
return true;
return false;
);
if(isBillingAddressInitialized)
return;
....
This code actually goes through customer addresses and checks if any of them has defaultBilling set to true. If such an address exists it will be used as the billing address. If not the script will fall back to the default magento behavior
I'm running into a similar issue, but only when I add a new address in the shipping step prior to going to the payment step, it ends up taking the new shipping address and automatically changing the default billing address to the new shipping address. Any idea what could cause that? I tried this fix, however the issue persists.
– ne0nlight
Oct 10 '18 at 19:40
add a comment |
You could do the following:
- overwrite a default js file checkout-data-resolver.js
- add extra lines to the applyBillingAddress function to check if default
billing address exists and if true to use it
step 1. Overwritting a default magento checkout-data-resolver.js
1.1 Create your module. YourCompanyCheckout
1.2 Add file appcodeYourCompanyCheckoutviewfrontendrequirejs-config.js
with following content
var config =
map:
'*':
'Magento_Checkout/js/model/checkout-data-resolver':
'YourCompany_Checkout/js/model/checkout-data-resolver'
;
- 1.3 Copy magento file vendormagentomodule-checkoutviewfrontendwebjsmodelcheckout-data-resolver.js
to the destination
appcodeYourCompanyCheckoutviewfrontendwebjsmodelcheckout-data-resolver.js
step 2. Modify applyBillingAddress function
2.1 in new checkout-data-resolver.js file find applyBillingAddress. Insert following cod after var shippingAddress;
and before if (quote.billingAddress())
....
var isBillingAddressInitialized;
isBillingAddressInitialized = addressList.some(function (addressFromList)
if (addressFromList.isDefaultBilling())
selectBillingAddress(addressFromList);
return true;
return false;
);
if(isBillingAddressInitialized)
return;
....
This code actually goes through customer addresses and checks if any of them has defaultBilling set to true. If such an address exists it will be used as the billing address. If not the script will fall back to the default magento behavior
I'm running into a similar issue, but only when I add a new address in the shipping step prior to going to the payment step, it ends up taking the new shipping address and automatically changing the default billing address to the new shipping address. Any idea what could cause that? I tried this fix, however the issue persists.
– ne0nlight
Oct 10 '18 at 19:40
add a comment |
You could do the following:
- overwrite a default js file checkout-data-resolver.js
- add extra lines to the applyBillingAddress function to check if default
billing address exists and if true to use it
step 1. Overwritting a default magento checkout-data-resolver.js
1.1 Create your module. YourCompanyCheckout
1.2 Add file appcodeYourCompanyCheckoutviewfrontendrequirejs-config.js
with following content
var config =
map:
'*':
'Magento_Checkout/js/model/checkout-data-resolver':
'YourCompany_Checkout/js/model/checkout-data-resolver'
;
- 1.3 Copy magento file vendormagentomodule-checkoutviewfrontendwebjsmodelcheckout-data-resolver.js
to the destination
appcodeYourCompanyCheckoutviewfrontendwebjsmodelcheckout-data-resolver.js
step 2. Modify applyBillingAddress function
2.1 in new checkout-data-resolver.js file find applyBillingAddress. Insert following cod after var shippingAddress;
and before if (quote.billingAddress())
....
var isBillingAddressInitialized;
isBillingAddressInitialized = addressList.some(function (addressFromList)
if (addressFromList.isDefaultBilling())
selectBillingAddress(addressFromList);
return true;
return false;
);
if(isBillingAddressInitialized)
return;
....
This code actually goes through customer addresses and checks if any of them has defaultBilling set to true. If such an address exists it will be used as the billing address. If not the script will fall back to the default magento behavior
You could do the following:
- overwrite a default js file checkout-data-resolver.js
- add extra lines to the applyBillingAddress function to check if default
billing address exists and if true to use it
step 1. Overwritting a default magento checkout-data-resolver.js
1.1 Create your module. YourCompanyCheckout
1.2 Add file appcodeYourCompanyCheckoutviewfrontendrequirejs-config.js
with following content
var config =
map:
'*':
'Magento_Checkout/js/model/checkout-data-resolver':
'YourCompany_Checkout/js/model/checkout-data-resolver'
;
- 1.3 Copy magento file vendormagentomodule-checkoutviewfrontendwebjsmodelcheckout-data-resolver.js
to the destination
appcodeYourCompanyCheckoutviewfrontendwebjsmodelcheckout-data-resolver.js
step 2. Modify applyBillingAddress function
2.1 in new checkout-data-resolver.js file find applyBillingAddress. Insert following cod after var shippingAddress;
and before if (quote.billingAddress())
....
var isBillingAddressInitialized;
isBillingAddressInitialized = addressList.some(function (addressFromList)
if (addressFromList.isDefaultBilling())
selectBillingAddress(addressFromList);
return true;
return false;
);
if(isBillingAddressInitialized)
return;
....
This code actually goes through customer addresses and checks if any of them has defaultBilling set to true. If such an address exists it will be used as the billing address. If not the script will fall back to the default magento behavior
answered Sep 27 '18 at 8:05
Михаил КрыловМихаил Крылов
11
11
I'm running into a similar issue, but only when I add a new address in the shipping step prior to going to the payment step, it ends up taking the new shipping address and automatically changing the default billing address to the new shipping address. Any idea what could cause that? I tried this fix, however the issue persists.
– ne0nlight
Oct 10 '18 at 19:40
add a comment |
I'm running into a similar issue, but only when I add a new address in the shipping step prior to going to the payment step, it ends up taking the new shipping address and automatically changing the default billing address to the new shipping address. Any idea what could cause that? I tried this fix, however the issue persists.
– ne0nlight
Oct 10 '18 at 19:40
I'm running into a similar issue, but only when I add a new address in the shipping step prior to going to the payment step, it ends up taking the new shipping address and automatically changing the default billing address to the new shipping address. Any idea what could cause that? I tried this fix, however the issue persists.
– ne0nlight
Oct 10 '18 at 19:40
I'm running into a similar issue, but only when I add a new address in the shipping step prior to going to the payment step, it ends up taking the new shipping address and automatically changing the default billing address to the new shipping address. Any idea what could cause that? I tried this fix, however the issue persists.
– ne0nlight
Oct 10 '18 at 19:40
add a comment |
I got solution of this problem.
please check your theme override file:
/app/design/frontend/Vendor/your-theme/Magento_Checkout/web/js/view/shipping.js
in this file checkout your custom code on line no 114 or may be change of this line your file. So, checkout this function
initialize: function ()
Inside this function check following code
registry.async('checkoutProvider')(function (checkoutProvider)
//////////
Your Code
/////////
);
from this jQuery remove your custom code or update with new code.
hope it will work for you. In my case it is working for me after update this function.
Thanks
add a comment |
I got solution of this problem.
please check your theme override file:
/app/design/frontend/Vendor/your-theme/Magento_Checkout/web/js/view/shipping.js
in this file checkout your custom code on line no 114 or may be change of this line your file. So, checkout this function
initialize: function ()
Inside this function check following code
registry.async('checkoutProvider')(function (checkoutProvider)
//////////
Your Code
/////////
);
from this jQuery remove your custom code or update with new code.
hope it will work for you. In my case it is working for me after update this function.
Thanks
add a comment |
I got solution of this problem.
please check your theme override file:
/app/design/frontend/Vendor/your-theme/Magento_Checkout/web/js/view/shipping.js
in this file checkout your custom code on line no 114 or may be change of this line your file. So, checkout this function
initialize: function ()
Inside this function check following code
registry.async('checkoutProvider')(function (checkoutProvider)
//////////
Your Code
/////////
);
from this jQuery remove your custom code or update with new code.
hope it will work for you. In my case it is working for me after update this function.
Thanks
I got solution of this problem.
please check your theme override file:
/app/design/frontend/Vendor/your-theme/Magento_Checkout/web/js/view/shipping.js
in this file checkout your custom code on line no 114 or may be change of this line your file. So, checkout this function
initialize: function ()
Inside this function check following code
registry.async('checkoutProvider')(function (checkoutProvider)
//////////
Your Code
/////////
);
from this jQuery remove your custom code or update with new code.
hope it will work for you. In my case it is working for me after update this function.
Thanks
answered Nov 15 '18 at 10:15
SarfarajSarfaraj
405518
405518
add a comment |
add a comment |
Thanks for contributing an answer to Magento Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f139195%2fmagento-2-default-billing-address-not-selected-by-default-on-checkout-page%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Hi did you get a solution for this?
– Geethika Antony
Mar 16 '17 at 4:54
Hi Ashish, I face some different kind of problem but If you can write the solution of this than it's may be its help full.
– jaydip sinh Parmar
Sep 12 '17 at 6:55