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

Inconsistent wishlists for logged in user #132

Closed
LucaGallinari opened this issue Apr 20, 2022 · 2 comments
Closed

Inconsistent wishlists for logged in user #132

LucaGallinari opened this issue Apr 20, 2022 · 2 comments
Labels

Comments

@LucaGallinari
Copy link

With version 2.0, wishlists for logged in user have a lot of inconsistencies.

Not logged in user
The first time a user enter the website a new token is generated and assigned to the user. This token is stored both on DB and as cookie. The token is used as identifier to retrieve the wishlists of the user. If the user cleans his cookie the wishlist resets as a new token is generated and assigned to him. This is ok.

The user logs in
Now, if a not logged in user has a wishlist with some products and logs in, he will see the new wishlist as his token is still the same, but if he clean his cookies, the wishlist disappears. This is bad, and this is due to the fact that, on the DB, the field "shop_user_id" of the wishlist is not populated with the id of the user upon login.

Now, a new token has been generated, and the user can add products to the wishlist, and this wishlist has the "shop_user_id" populated. Ok, but now, everytime the user cleans his cookies a new token will be generated and a new wishlist will be created for him.


P.S. the demo here doesn't seems to have the last version of this plugin. Moreover, it seems impossibile to register and login, cause the verification email is never delivered.

@Wojdylak Wojdylak added the todo label Mar 15, 2023
@Wojdylak
Copy link
Member

Yes, it is a bug. I created PR #198

@Wojdylak
Copy link
Member

Pull request merged

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

No branches or pull requests

2 participants