Skip to content

Customer Address "default billing address" Attribute Not Used in Checkout #8777

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ddeppner opened this issue Mar 3, 2017 · 39 comments
Closed
Labels
Component: Checkout Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release

Comments

@ddeppner
Copy link

ddeppner commented Mar 3, 2017

When a logged in customer adds addresses to their address book, they are able to specify a default shipping address and a default billing address.

If the logged in customer then goes through checkout, when they reach the payment screen, their previously selected "default billing address" is not displayed as the default. Instead the default billing address is the shipping address they selected during checkout, and they must uncheck the "My billing and shipping address are the same" checkbox in order to manually select their default billing address.

This is not a crippling bug, but it is an annoyance for customers during checkout, and the UI should be addressed to prevent confusion and annoyance.

If a customer selects a default billing address for their account, it should be the default address displayed on the payment screen of checkout.

Preconditions

Install Magento 2. Any version. I am currently running 2.1.6, but I believe this bug is in every version.

Steps to reproduce

  1. Log in to the frontend as a customer of a store
  2. Specify that an address is your default billing address:

image

  1. Add any product to your cart
  2. Go to checkout
  3. Select any shipping address, any shipping method, then click Next

Actual result

The shipping address selected in checkout will be preselected as the billing address, like this:

image

Expected result

Since the customer has previously specified a DEFAULT BILLING ADDRESS, the customer expects their default billing address to be used as the DEFAULT BILLING ADDRESS.

Due to this bug, the user is required to uncheck the "My billing and shipping address are the same" checkbox, and select their default billing address from the drop-down list that displays.

It may be reasonable to the use Shipping Address as the default billing address during checkout IF and ONLY IF the customer has not specified a default billing address. That is also reasonable with all guest checkouts.

But for a logged-in user who has already specified a default billing address, it is a BUG to not respect their pre-selected choice during checkout.

Additional Information

So... No, I am not looking for "advice" or "discussion". This is a bug caused by overriding a customer-specified option with what would normally be a sensible default, but that is only sensible in certain situations. This is a "technical issue" that needs to be addressed in all versions of Magento 2.

This is a confusing issue for users on our live M2 site and it has resulted in multiple customer service issues with incorrect addresses slipping on to orders because customers assume the default billing address they specify will be respected at checkout, and don't notice some of the time that this bug is changing it on them.

I see two alternate obvious solutions:

  1. When a user is logged in AND has selected a default billing address, then that address should be pre-selected as the billing address during checkout.
  2. If you are not going to respect the user's pre-selected default billing address, then the option to select a default billing address in their Address Book section should be removed in order to prevent confusion.

I would prefer option 1. Users who want to pre-select their billing address would also like option 1. Option 1 is especially important for B2B merchants where their customers may have many addresses to manage in Magento and want invoices to go to company headquarters (this is a common use case for us on our production B2B M2 site).

@southerncomputer
Copy link
Contributor

You know the right thing would be a mirror of the select shipping address for billing address adding another step to the checkout process!

This is a retail design curiosity since 99% of home customers use the same ship/bill-to anyways!

But I agree - add another step to one page so you can select/update your billing address before the shipping address - like it should be!

Not very professional how most one page checkouts leave out things like PO_NUMBER (even for CC) and assume the billto/shipto are the same!

@erikhansen
Copy link
Contributor

I agree that this is an issue, especially for B2B merchants. This may not be the best UI, but here is one way that this the "default billing address" handling could be improved:

If a customer has a billing address that is different than their default shipping address (for example) then when they get to the second step of the checkout, this is what they should see:

16-31-38 proxy php 1304x769 -ku4r9

@thomasnordkvist
Copy link

I also agree that this is an issue.

I would like to take @erikhansen example one step further in that it should be pre set with the default billing address to avoid pushing the update button.

@veloraven
Copy link
Contributor

@ddeppner if you want to report an issue please format this issue according to the Issue reporting guidelines: with steps to reproduce, actual result and expected result.
Please, also identify which version of Magento you are running.
If you are looking for some advice or discussion please refer to the Community Forums or the Magento Stack Exchange site as GitHub issue tracker is intended for technical issues only.

@ddeppner
Copy link
Author

ddeppner commented Jul 2, 2017

Here goes attempt 2:

TITLE

Magento 2 Should Not Ignore Customer-Selected Default Billing Address

PRECONDITIONS

Install Magento 2. Any version. I am currently running 2.1.6, but I believe this bug is in every version.

STEPS TO REPRODUCE

  1. Log in to the frontend as a customer of a store
  2. Specify that an address is your default billing address:

image

  1. Add any product to your cart
  2. Go to checkout
  3. Select any shipping address, any shipping method, then click Next

ACTUAL RESULT

The shipping address selected in checkout will be preselected as the billing address, like this:

image

EXPECTED RESULT

Since the customer has previously specified a DEFAULT BILLING ADDRESS, the customer expects their default billing address to be used as the DEFAULT BILLING ADDRESS.

Due to this bug, the user is required to uncheck the "My billing and shipping address are the same" checkbox, and select their default billing address from the drop-down list that displays.

It may be reasonable to the use Shipping Address as the default billing address during checkout IF and ONLY IF the customer has not specified a default billing address. That is also reasonable with all guest checkouts.

But for a logged-in user who has already specified a default billing address, it is a BUG to not respect their pre-selected choice during checkout.

ADDITIONAL INFORMATION

So... No, I am not looking for "advice" or "discussion". This is a bug caused by overriding a customer-specified option with what would normally be a sensible default, but that is only sensible in certain situations. This is a "technical issue" that needs to be addressed in all versions of Magento 2.

This is a confusing issue for users on our live M2 site and it has resulted in multiple customer service issues with incorrect addresses slipping on to orders because customers assume the default billing address they specify will be respected at checkout, and don't notice some of the time that this bug is changing it on them.

I see two alternate obvious solutions:

  1. When a user is logged in AND has selected a default billing address, then that address should be pre-selected as the billing address during checkout.
  2. If you are not going to respect the user's pre-selected default billing address, then the option to select a default billing address in their Address Book section should be removed in order to prevent confusion.

I would prefer option 1. Users who want to pre-select their billing address would also like option 1. Option 1 is especially important for B2B merchants where their customers may have many addresses to manage in Magento and want invoices to go to company headquarters (this is a common use case for us on our production B2B M2 site).

@zexperto
Copy link

Hi,
Any news regarding this issue ?

@RomanKrut
Copy link

@ddeppner Hi. Thanks for the feedback. The internal ticket MAGETWO-70996 was created to address this issue.

@veloraven veloraven added the Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development label Jul 25, 2017
@steved1982
Copy link

Hello any progress on the Internal Ticket?

@southerncomputer
Copy link
Contributor

https://www.goivvy.com/blog/magento-2-set-billing-shipping-address-unchecked-default-checkout
how if neuter the address same as shipping checkbox which overrides the billing with the shipping address

@zexperto
Copy link

zexperto commented Aug 29, 2017

Thank you @southerncomputer , Actually i did that but we still have a problem in selecting the address,
if you have one address you will have this view
image
you still need from customer to click "Update", it is not user friendly

@southerncomputer
Copy link
Contributor

Yeah I had to change the module that creates the customer cart to load a default shipping/billing address or fall back to any address since when the quote gets made, it is loaded with empty values, then the onepage checkout loads the default shipping address into the tables if they are empty but if they are preloaded at cart creation then the values stick!

@magento-engcom-team magento-engcom-team added 2.1.x Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development bug report Component: Checkout Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed labels Sep 11, 2017
@magento-engcom-team
Copy link
Contributor

@ddeppner, thank you for your report.
We've created internal ticket(s) MAGETWO-70996 to track progress on the issue.

@erikhansen
Copy link
Contributor

erikhansen commented Oct 6, 2017

For what it's worth, Classy Llama implemented a custom extension to auto-select the default billing address. I've attached the extension to this comment. Use at your own risk.
ClassyLlama_DefaultBillingAddress.zip

UPDATE 1/23/18 - The issue reported by @southerncomputer should now be fixed.

@magento - Feel free to reference this code as you're working on the MAGETWO-70996 ticket.

@southerncomputer
Copy link
Contributor

The ClassyLlama patch can cause a loop to occur if you've modified your reloading of payment upon Billing Address change in One Step Checkout! Be careful!

@magento-engcom-team magento-engcom-team added 2.2.x Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed labels Oct 11, 2017
@orlangur orlangur removed Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release bug report labels Apr 4, 2019
@magento-engcom-team magento-engcom-team added the Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed label Apr 4, 2019
@ghost ghost self-assigned this Apr 9, 2019
@m2-assistant
Copy link

m2-assistant bot commented Apr 9, 2019

Hi @engcom-backlog-nazar. Thank you for working on this issue.
In order to make sure that issue has enough information and ready for development, please read and check the following instruction: 👇

  • 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).

    DetailsIf the issue has a valid description, the label Issue: Format is valid will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid appears.

  • 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description label to the issue by yourself.

  • 3. Add Component: XXXXX label(s) to the ticket, indicating the components it may be related to.

  • 4. Verify that the issue is reproducible on 2.3-develop branch

    Details- Add the comment @magento-engcom-team give me 2.3-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.3-develop branch, please, add the label Reproduced on 2.3.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!

  • 5. Verify that the issue is reproducible on 2.2-develop branch.

    Details- Add the comment @magento-engcom-team give me 2.2-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.2-develop branch, please add the label Reproduced on 2.2.x

  • 6. Add label Issue: Confirmed once verification is complete.

  • 7. Make sure that automatic system confirms that report has been added to the backlog.

@ghost ghost added Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Component: Checkout Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed labels Apr 9, 2019
@ghost ghost removed their assignment Apr 10, 2019
magento-engcom-team pushed a commit that referenced this issue Apr 15, 2019
magento-engcom-team pushed a commit that referenced this issue Apr 15, 2019
magento-engcom-team pushed a commit that referenced this issue Apr 15, 2019
…tribute Not Used in Checkout #8777

# Conflicts:
#	app/code/Magento/Braintree/Test/Mftf/Test/BraintreeCreditCardOnCheckoutTest.xml
#	app/code/Magento/Checkout/Test/Mftf/Section/CheckoutPaymentSection.xml
#	app/code/Magento/Checkout/Test/Mftf/Test/DefaultBillingAddressShouldBeCheckedOnPaymentPageTest.xml
#	app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCustomerCheckoutTest.xml
#	app/code/Magento/Checkout/view/frontend/web/js/model/checkout-data-resolver.js
magento-engcom-team pushed a commit that referenced this issue Apr 15, 2019
magento-engcom-team pushed a commit that referenced this issue Apr 15, 2019
@sdzhepa
Copy link
Contributor

sdzhepa commented Apr 30, 2019

Hello @ddeppner @pemann @erikhansen @kamchovet

Thank you for contribution and collaboration!

The corresponding internal tickets MAGETWO-70996, MAGETWO-72961 were fixed and closed by Magento team

Delivered to 2.3-develop branch and should be available with 2.3.2 release
Please see details in the next commits:

Delivered to 2.2-develop branch and should be available with 2.2.9 release
Please see details in the next commits:

@sdzhepa sdzhepa closed this as completed Apr 30, 2019
@budoland-ab
Copy link

Issue still remains in 2.3.2.

@timkoopmans50
Copy link

Still reproduced this in a 2.3.5-p1 shop.

@moranotcsos
Copy link

@magento give me 2.3.6-develop instance

@magento-deployment-service
Copy link

Hi @moranotcsos. Thank you for your request. I'm working on Magento instance for you.

@magento-deployment-service
Copy link

Hi @moranotcsos, unfortunately there is no ability to deploy Magento instance at the moment. Please try again later.

@ghost
Copy link

ghost commented Nov 24, 2020

@magento give me 2.4-develop instance

@magento-deployment-service
Copy link

Hi @pmcnamaracpc. Thank you for your request. I'm working on Magento instance for you.

@magento-deployment-service
Copy link

@ghost
Copy link

ghost commented Nov 24, 2020

Not sure about those reports of this not being addressed on 2.3, but this works on 2.4-develop

  1. Setup these addresses on a customer:
    01_Setup Addresses
  2. Entered shipping step, shipping address is preselected as intended.
    02_enter_shipping_step
  3. Entered billing step, billing address is preselected as intended.
    03_enter_billing_step

@sameh30185
Copy link

Any one get solution on this issue i have faced this issue on magento clould 2.4 too with city drop down module , but when disble this module it is working fine

@mohammedceil
Copy link

mohammedceil commented Sep 23, 2021

I traced down the billing address listing js & found a solution with a code change. It works fine for me. I copied the following file into my theme -
vendor/magento/module-customer/view/frontend/web/js/model/customer-addresses.js & updated the function getAddressItems: function () { with the following code

If anyone finds it useful can make use of it. This change will uncheck the "Same as shipping" checkbox & set the default billing address on page load without any manual change by the customer. Hope this helps

      getAddressItems: function () {
      var items = [],
            customerData = window.customerData;
        if (isLoggedIn()) {
            if (Object.keys(customerData).length) {
                $.each(customerData.addresses, function (key, item) {
                    var customSort = new Address(item);
                    if(customSort.isDefaultBilling()){
                        items.push(new Address(item));
                    }
                });
            }

            if (Object.keys(customerData).length) {
                $.each(customerData.addresses, function (key, item) {
                    var customSort = new Address(item);
                    if(!customSort.isDefaultBilling()){
                        items.push(new Address(item));
                    }
                });
            }
        }
        return items; 
        }

checked in Magento ver 2.3.6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Checkout Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release
Projects
None yet
Development

No branches or pull requests