Hi Joe,
Currently I am on vacation, but I will look into this when I come back. That would be August 6th.
Maybe there is some issue with the cookie path, but that’s just a wild guess.
Kind regards, Joris
Thread Starter
Joe
(@joecole1)
No rush! Enjoy your vacation…
I’ll try to troubleshoot and post some thoughts here in the meantime. It’s not a site-breaking bug, and I have so much going on on my store it could very well be an incompatibility with something else.
Here’s the cookie info after adding one product: https://imgur.com/3YRijmj
After adding two: https://imgur.com/UCIc9eD
When removing a product, the cookie goes back to one id just fine, but when trying to remove the last product, it stays until the second time visiting the page and removing again.
And in the user meta, the value goes from:
a:1:{i:0;s:4:"5841";}
to
a:2:{i:0;s:4:"5841";i:1;s:4:"4915";}
It is a cookie issue, although I’m not quite sure how yet.
After removing the last item, the cookie still has the last product id in it, even though the user_meta wishlist key goes to value:
a:0:{}
Looking into it further.
-
This reply was modified 4 years, 1 month ago by
Joe.
-
This reply was modified 4 years, 1 month ago by
Joe.
-
This reply was modified 4 years, 1 month ago by
Joe.
-
This reply was modified 4 years, 1 month ago by
Joe.
Hi Joe,
I thought I had already replyed to this, but anyway.
I had a look at the site parisbloom.com wich I see on your screenshots, but I can’t seem to find the wishlist functionality. If you want me to have a closer look, please email me at: joris@loft.nu and tell me where to look.
I will see if I can help.
Kind regards, Joris van Montfort
Thread Starter
Joe
(@joecole1)
Joris, the shop is currently behind a login only during pre-orders for our customers.
If you don’t mind creating a login, you can see it at https://parisbloom.com/shop/
Hi Joe,
I had a look a the site and I found the problem. Please update to version 1.2.8 as it contains a fix for this issue.
Kind regards, Joris
Thread Starter
Joe
(@joecole1)
Great, thank you!
Just curious, what was the issue?
It was a common bug, not specific tou your website alone. I was setting the cookie in php also on page load if the user was logged in and had a wishlist stored. This way the cookie changed to a session cookie when the user was logged in. The session cookie would not be manipulated correctly by the JS code. The new situation is a JS cookie. When logged in the wish list is also stored as user meta so it can be called after user login. The user meta was already in the plugin. The main difference is that the user meta does not get witten to a session cookie.
Thread Starter
Joe
(@joecole1)
Awesome, thanks for tracking that down. I thought that was what was happening but am not experienced enough to find it myself!