Skip to content
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

Convert to Customer to working anymore. #18

Open
JelleGe opened this issue Sep 29, 2023 · 3 comments
Open

Convert to Customer to working anymore. #18

JelleGe opened this issue Sep 29, 2023 · 3 comments

Comments

@JelleGe
Copy link

JelleGe commented Sep 29, 2023

Magento version #: 2.4.6-p2

Edition (EE, CE, OS, etc): CE

Expected behavior: Convert order to customer

Actual behavior: Error message; A customer with the same email address already exists in an associated website.

It's not possible anymore to convert a guest order to a customer, when there is already an existing customer with the same email address. Then we fetch the error: A customer with the same email address already exists in an associated website.

@JeremyAtMethodMarketing

Magento changed how magento/module-customer/Model/AccountManagement.php handles the isEmailAvailable function. It now checks the GUEST_CHECKOUT_LOGIN_OPTION_SYS_CONFIG config and if it is set to false isEmailAvailable always returns true.
In magepal/magento2-guest-to-customer/Controller/Adminhtml/Customer/Index.php execute() if isEmailAvailable() evaluates to true it attempts to create a new customer, this is what throws the error. The customer does exist and the plugin errors out of customer creation and never reaches the merge guest with customer code.

@iphigenie
Copy link

@JeremyAtMethodMarketing thanks for spotting it!
I don't like enabling this "guest checkout login" option BUT it does explain why this stopped working.

@srenon
Copy link
Contributor

srenon commented Nov 22, 2024

@JeremyAtMethodMarketing @iphigenie ... can you test these changes and let me know

cf397a1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants