magento / magento2

Prior to making any Submission(s), you must sign an Adobe Contributor License Agreement, available here at: https://opensource.adobe.com/cla.html. All Submissions you make to Adobe Inc. and its affiliates, assigns and subsidiaries (collectively “Adobe”) are subject to the terms of the Adobe Contributor License Agreement.
http://www.magento.com
Open Software License 3.0
11.55k stars 9.32k forks source link

Billing Address Form does not preload billing address after page refresh when Display Billing Address On is set Payment Page #33899

Open abude opened 3 years ago

abude commented 3 years ago

Preconditions (*)

  1. Magento 2.4.2
  2. Vanilla, clean install with sample-data

Steps to reproduce (*)

  1. Go to admin -> store -> config -> sales -> checkout and set Display Billing Address On to Payment Page
  2. Go to frontend -> add any product to the cart
  3. Go to checkout and fill email, shipping address and choose shipping method
  4. Go to payment step, uncheck My billing and shipping address are the same
  5. Fill new address in the billing address form and click update
  6. Now, refresh the page and click edit on the billing address
  7. Form is empty, without values.

Video: https://www.dropbox.com/s/qqplkwkaqbo0phz/billingAddress-issue.mov?dl=0

Expected result (*)

  1. After filling in the billing address form a different billing address than shipping address and refreshing the page, it should preload the data of the billing address in the form.
  2. Data is there, in the localStorage

PS. all the other components are preloaded: email, shipping address, shipping method, payment method.

Actual result (*)

  1. Form of billing address after refresh page is not preloading the previously saved billing address, which is different than the shipping address.

Please provide Severity assessment for the Issue as Reporter. This information will help during Confirmation and Issue triage processes.

m2-assistant[bot] commented 3 years ago

Hi @abude. Thank you for your report. To help us process this issue please make sure that you provided the following information:

Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:

@magento give me 2.4-develop instance - upcoming 2.4.x release

For more details, please, review the Magento Contributor Assistant documentation.

Please, add a comment to assign the issue: @magento I am working on this


:clock10: You can find the schedule on the Magento Community Calendar page.

:telephone_receiver: The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, please join the Community Contributions Triage session to discuss the appropriate ticket.

:movie_camera: You can find the recording of the previous Community Contributions Triage on the Magento Youtube Channel

:pencil2: Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel

m2-assistant[bot] commented 3 years ago

Hi @engcom-Delta. 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: :point_down:

engcom-Delta commented 3 years ago

Hi @abude ,

We verified the issue on Magento2.4 Develop, it is not reproducible . we could see that after refresh data is being loaded. Please find the attached snapshots for reference. Pre-filled

Kindly request to reverify from your end once again and please confirm.

thanks

abude commented 3 years ago

@magento give me 2.4-develop instance

magento-deployment-service[bot] commented 3 years ago

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

magento-deployment-service[bot] commented 3 years ago

Hi @abude, here is your Magento Instance: https://8115e78137a8010c7a48737baece4047-2-4-develop.instances.magento-community.engineering Admin access: https://8115e78137a8010c7a48737baece4047-2-4-develop.instances.magento-community.engineering/admin_2327 Login: c97ee737 Password: cae3c3559a3a

abude commented 3 years ago

hello @engcom-Delta,

Thanks for the update, I was able to replicate the issue in the 2.4-develop instance.

Are you sure you did this: Go to admin -> store -> config -> sales -> checkout and set Display Billing Address On to Payment Page

Are you sure you tried the form if the billing address and not the shipping address?

Thank you!

engcom-Delta commented 3 years ago

@magento give me 2.4.2 instance

magento-deployment-service[bot] commented 3 years ago

Hi @engcom-Delta. Thank you for your request. I'm working on Magento instance for you.

magento-deployment-service[bot] commented 3 years ago

Hi @engcom-Delta, here is your Magento Instance: https://8115e78137a8010c7a48737baece4047-2-4-2.instances.magento-community.engineering Admin access: https://8115e78137a8010c7a48737baece4047-2-4-2.instances.magento-community.engineering/admin_0095 Login: 0a4ea197 Password: e3577cd83d57

engcom-Delta commented 3 years ago

Hi @abude , Issue is reproducible on Magento 2.4.2 instance & Magento 2.4 Develop. Hence adding the label 'Issue confirmed'. Kindly find the attached screenshots for reference.

  1. Go to admin -> store -> config -> sales -> checkout and set Display Billing Address On to Payment Page Payment_Page_Saved
  2. Go to frontend -> add any product to the cart AddedItemtoCart
  3. Go to checkout and fill email, shipping address and choose shipping method
  4. Go to payment step, uncheck My billing and shipping address are the same uncheck1
  5. Fill new address in the billing address form and click update Filled_newaddress
  6. Now, refresh the page and click edit on the billing address Before_refresh
  7. Form is empty, without values. After_refresh_Edit
m2-assistant[bot] commented 3 years ago

Hi @engcom-Delta. Thank you for working on this issue. Looks like this issue is already verified and confirmed. But if you want to validate it one more time, please, go though the following instruction:


ThomasNegeli commented 3 years ago

@engcom-Delta this issue is not Admin UI related. Please remove the label.

Usik2203 commented 2 years ago

@magento I am working on this

gexxx05 commented 1 year ago

I have investigated the issue on M2.4.4 and found the following behaviour. In my example I am using the payment method checkmo. The affected file: https://github.com/magento/magento2/blob/2.4-develop/app/code/Magento/Checkout/view/frontend/web/js/view/payment/default.js

The problem is, that billingAddressCode will stay billingAddress + payment code but the object in checkoutProvider changes name to billingAddress + shared.

I don't know if this is the best solution, but if we change line 68 to billingAddressCode = 'billingAddress' + (window.checkoutConfig.displayBillingOnPaymentMethod ? this.getCode() : 'shared'); everything will work as expected.

engcom-Bravo commented 3 months ago

Hi @abude,

Thanks for your reporting and collaboration.

We have verified the issue in Latest 2.4-develop instance and the issue is reproducible.Kindly refer the attached video.

https://github.com/user-attachments/assets/326fab75-9f35-48ed-a477-4a99d7fd4d6e

NOTE : without refreshing the page it is working fine.

Hence Confirming the issue.

Thanks.

gexxx05 commented 3 months ago

Thanks @engcom-Bravo, the solution is right here: https://github.com/magento/magento2/issues/33899#issuecomment-1401550007

github-jira-sync-bot commented 3 months ago

:white_check_mark: Jira issue https://jira.corp.adobe.com/browse/AC-12539 is successfully created for this GitHub issue.

m2-assistant[bot] commented 3 months ago

:white_check_mark: Confirmed by @engcom-Bravo. Thank you for verifying the issue.
Issue Available: @engcom-Bravo, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.