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

No customer addresses saved by default when creating an admin order for a new customer #38056

Open hewgim opened 1 year ago

hewgim commented 1 year ago

Preconditions and environment

Magento 2.4.5-p3

Steps to reproduce

Goto Sales Order Grid Click on Create New Order Click on Create New Customer Add a product to the order Fill in the email address with a previously unused email Fill in the address details (NOTE: Do not touch the Add to Address Book checkboxes. These default to unchecked) Fill in the shipping info and payment info Click on Submit Order

Expected result

Order is placed New customer record is saved with a default billing address and default shipping address set to the the addresses specified on the order. The addresses can then be used the next time a customer places an order.

Actual result

Order is placed New customer record is saved with no addresses (because the Add to Address Book checkboxes default to unchecked). That means when the customer orders again, there are no address details available and they have to be entered again.

Additional information

I believe the Add to Address checkboxes should be defaulted to checked when adding new addresses (this includes the creation of an admin order for a new customer). Thus by default any new address will be saved

I believe the Add to Address checkboxes should be defaulted to unchecked when existing addresses are being used to avoid duplicate addresses being created see #8181 . In the case where an existing address is being used the Add to Address Book checkbox is confusing. If the address is edited, and the Add to Address Book checkbox is set to checked, does this mean that the existing address should be modified or that a new address is created with the new details, leaving the old address intact? If the latter why would this not be handled by the user explicitly selecting that they want a new address?

Release note

No response

Triage and priority

m2-assistant[bot] commented 1 year ago

Hi @hewgim. Thank you for your report. To speed up processing of this issue, make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, Add a comment to the issue:

m2-assistant[bot] commented 1 year ago

Hi @engcom-Bravo. 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-Bravo commented 1 year ago

@magento give me 2.4-develop instance

magento-deployment-service[bot] commented 1 year ago

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

magento-deployment-service[bot] commented 1 year ago

Hi @engcom-Bravo, here is your Magento Instance: https://bd4424ecd66b0896713bbd412490ed3b.instances-prod.magento-community.engineering Admin access: https://bd4424ecd66b0896713bbd412490ed3b.instances-prod.magento-community.engineering/admin_dd89 Login: 0837f4c3 Password: f52e434b60a3

engcom-Bravo commented 1 year ago

Hi @hewgim,

Thank you for reporting and collaboration.

Verified the issue on Magento 2.4-develop instance.Kindly refer the screenshots.

Steps to reproduce

Screenshot 2023-10-10 at 12 57 33 PM

Order is placed New customer record is saved with no addresses (because the Add to Address Book checkboxes default to unchecked). It seems to expected behaviour of Magento because we have unchecked Add to Address Book.

Here we can see when we order with new email address with unchecked Add to Address Book the customer is created without address so in that case the address will not come while placing an order with same customer.

If the address is there in address book it will show usually.

Screenshot 2023-10-10 at 12 58 12 PM

It is working fine when we checked Add to Address Book.

Thanks.

hewgim commented 1 year ago

Hi @engcom-Bravo ,

My view is that

1) The Add to Address Book should default to checked when new addresses are being created, for example, when a new admin order is being created for a new customer. This means that the addresses are saved if the customer comes back to place a second order

2) The Add to Address Book should default to unchecked when using an existing address, to avoid duplicates. see https://github.com/magento/magento2/issues/8181

Kind regards

Mark

engcom-Bravo commented 1 year ago

Hi @hewgim,

Thanks for your update.

Add to Address Book it should not checked by default it depends upon customer and we have to do it by manually.when we checked it will add that particular address to Address Book.

https://github.com/magento/magento2/issues/8181 this issue is different because here after adding address to Address Book the address got duplicated in Customer account information and this issue not at all reproducible in Latest Magento 2.4 develop instance.

We request you to try to reproduce the issue in the 2.4-develop branch and let us know if it is reproducible for you.

Thanks

hewgim commented 1 year ago

Hi @engcom-Bravo,

I understand what you are saying. In my view this isn't a bug but just sub-optimal behaviour. It was actually an end user of Magento, my client, who asked me to raise this. My client keeps on forgetting to click on the Add to Address Book when they create a new admin order for a NEW customer. This means that the addresses don't get stored against the customer account and when the customer orders again they have to reenter the customer details. For me the default for a new admin order for a new customer should be to store the addresses becuase 95% of the time that would make sense, and that used to be the case in Magento 2.3.7 where the Add to Address Book was checked (so my client tells me) However, this led to the duplicate problem #8181 when the default Add to Address book was checked and it was an EXISTING customer placing a new order. My suggestion is that the Add to Address Book should be checked for a new address by default, and unchecked for an existing address by default. That would be the best of both worlds. I've just put a fix in to do this, and it seems to work much better for my client than the existing Magento functionality.

I understand that this isn't a critical issue, but I do think my suggestion would be an improvement.

Feel free to close this though if it's unlikely to be taken further.

Kind regards

Mark

engcom-Bravo commented 1 year ago

Hi @hewgim,

Thanks for your update.

We are considering this as a Enhancement for new customer while creating an order in admin.Hence Marking this as a feature request to proceed further.

Thanks.