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

Error on checkout if customer selects billing address and image address attribute is present #30293

Open magento-engcom-team opened 4 years ago

magento-engcom-team commented 4 years ago

Customer can not checkout if he selects billing address which differs from shipping one and custom customer address attribute of image type is present

Steps to Reproduce:

  1. Login as Admin
  2. Create new custom customer address attribute (Store -> Attributes -> Customer Address):

    * Type = Image

  3. On Frontend create customer
  4. Add default address (for both shipping and billing) and upload some image to newly created attribute
  5. Add another address
  6. Start checkout process
  7. Select some address at shipping step
  8. Pass to payments step
  9. Untick checkbox 'My billing and shipping address are the same'
  10. Select some address from dropdown
  11. Click Update button

Actual Result: (-) A piece of code is shown (see screenshot) image

Expected Result: (/) Values for all attributes are shown correctly (/) Customer is able to finish checkout process successfully

magento-engcom-team commented 4 years ago

The issue was exported from the internal JIRA. The link to the original JIRA issue: https://jira.corp.magento.com/browse/MC-33704

m2-assistant[bot] commented 4 years ago

Hi @magento-engcom-team. 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

magento-engcom-team commented 4 years ago

:white_check_mark: Confirmed by @magento-engcom-team Thank you for verifying the issue. Based on the provided information internal tickets MC-33704 were created

Issue Available: @magento-engcom-team, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.

ghost commented 4 years ago

@magento I am working on this

viniciusbordinhao-blueacorn commented 3 years ago

@magento I am working on it.

viniciusbordinhao-blueacorn commented 3 years ago

@magento-engcom-team

This issue is not reproducible on Community Edition since the media_image type is banned from the frontend and backend as an attribute like you can see below:

https://github.com/magento/magento2/blob/2.4-develop/app/code/Magento/Customer/Model/Address/DataProvider.php#L216

I am not even able to create the attribute via admin panel like the steps to reproduce the issue suggested. It is not available for CE as well. I think the issue should be reported as an EE issue not like CE.

Please let me know if I have forgotten something regarding it.

lagunacellar commented 3 years ago

This may be EE specific. We are running Magento 2.4.1 on Cloud and encountering this issue repeatedly. See screenshots attached.

Checkout-1 shows the initial state at Review & Payments step, Place Order button is greyed out until customer confirms billing address.

Checkout-2 shows what happens after customer selects My billing and shipping addresses are the same.

checkout-1 checkout-2

mehdichaouch commented 3 years ago

I got the same issue on a new Magento 2.4.2 EE !

Remove _.values from _.values(currentBillingAddress().street).join(', ') to get (currentBillingAddress().street).join(', ') in vendor/magento/module-checkout/view/frontend/web/template/billing-address/details.html in vendor/magento/module-checkout-address-search/view/frontend/web/template/billing-address/details.html

Change those file by overriding it in your theme app/design/frontend/<theme_dir>/default/Magento_Checkout/web/template/billing-address/details.html. app/design/frontend/<theme_dir>/default/Magento_CheckoutAddressSearch/web/template/billing-address/details.html.

This worked for me.

source

Scarbous commented 3 years ago

In Mageneto 2.4.2-p1 I fixed it this way:

require(['Magento_Checkout/js/model/quote'], function(q){
console.log(q.billingAddress().street.toArray().join(', '))
});