Closed outline4 closed 11 months ago
Wishlist does support saving items to a cookie already? It should be that even when a user closes their browser, so long as it's the same machine and they haven't cleared their cookies, their content should persist?
Hi, I've programmed this yesterday and you were right, even if you close the browser or open a different browser, the wishlist persists.
BUT: today all of my wishlists are gone?
Can you give more information on how long you save the cookie? What's the name of the cookie? Is it possible to leave the cookie forever?
So the default cookie expiry is actually session-based (configurable), so while the wishlist items will remain after you close the browser, they'll be dropped once your session with Craft ends. I believe this was done for backward compatibility, so not all guest lists suddenly stuck around forever. I'd consider changing that to something far in the future, like P10Y
for 10 years.
The cookie name is Wishlist:sessionId
.
Thanks a bunch!
That clarifies a lot!
You're a life saver!
I'll check that out and hope that my wishlists are sticky now!
I can confirm that it works as expected! Thanks for helping me out!
Question
I would love to have more persistent lists, but not make anybody have to log in or register.
Be able to save a list into browser storage or a cookie so at least it's available on the same device even after you close the page. Sessions seem to be to volatile for our purpose.
Would this somehow be possible?
Additional context
No response