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

CO: Fix for mysql duplicated id for guest account registration - guest is duplicated if it has multiple customer accounts #6

Merged
merged 1 commit into from
Apr 2, 2020

Conversation

fkwakkenbos
Copy link
Contributor

Fix for a situation when a new registration as Guest occurs for someone who has already a Guest account registered. You've got a MySQL error for a duplicated ID because it tries to create a new guest record with the same id.

…t is duplicated if it has multiple customer accounts
@Progi1984 Progi1984 requested a review from a team November 28, 2019 09:31
@Progi1984 Progi1984 changed the title CO: Fix for mysql duplicated id for guest account registration - gues… CO: Fix for mysql duplicated id for guest account registration - guest is duplicated if it has multiple customer accounts Jan 13, 2020
@Progi1984 Progi1984 requested a review from a team March 11, 2020 08:22
@sarahdib
Copy link

@fkwakkenbos

Thanks for your contribution.

In order to reproduce the issue could you tell us where the mysql error appear ?
And in order to test this PR could you give us a test case scenario ?

Thank you

@fkwakkenbos
Copy link
Contributor Author

I'm not completely sure, but as far as i can see it happens when you create a guest account and leave it that way.
Then you create a new guest account, while having the current guest account cookie active (id_guest).
In normal situations this is not possible, but when you have a custom PrestaShop Theme, this may be possible.

@sarahdib
Copy link

sarahdib commented Apr 1, 2020

@fkwakkenbos
If I understand the steps is :

  1. create a guest customer in the FO
  2. Then I create a second time another customer guest with the same email ?

And that happen only with other template.

@fkwakkenbos
Copy link
Contributor Author

@sarahdib

Yes the steps are (not 100% sure):

  1. Create a guest customer in the FO
  2. Then I create a second time another customer guest with the same email ? (this should be only possible if the FO Theme allows this behaviour

@sarahdib
Copy link

sarahdib commented Apr 1, 2020

@fkwakkenbos

since I can't reproduce the issue I made some non-reg test and it seems ok for me.

@sarahdib sarahdib self-assigned this Apr 1, 2020
@Progi1984 Progi1984 merged commit 3f1bf25 into PrestaShop:dev Apr 2, 2020
@Progi1984
Copy link
Contributor

Thanks @fkwakkenbos

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