Hi Sam,
Have you checked if the item was actually saved on your local storage? If you’re not sure how to do it, you can check out the explanation here .
I’m having the exact same problem. It appears that an entry was made in my local storage, but the lightbox appears each and every time, not remembering that I was already at the page. Open a new tab, and it’s there again. I’ve used the exact code from the tutorial page (with the exception of using my lightbox name).
Has anyone found a fix for this code not working? I’m having the same problem. I am doing everything exactly according to the Wix instructions on this page: Velo Tutorial: Creating a One-Time Popup | Help Center | Wix.com but it doesn’t work at all anymore.
It actually used to work when I first bought my site, but not at all anymore.
@plusmentorship Interesting. Would you mind creating an empty box pinned to screen and plug it into your code instead of the lightbox? That might isolate whether the problem is something else in your code like having multiple iterations of the same cookie or something wonky with the lightbox.
@skmedia I’m not sure what that was supposed to do. I did that, but it didn’t work as well (Lightobx repeatedly showed up on page on refresh). And I am not sure what “wonky” there could be in a lightbox, since it was simply made in the Wix editor––no extra coding, etc.
@plusmentorship Lightbox is much more inefficient at loading than a box, so that rules out rendering errors. Do you have other places on your site where you’ve set local cookies or is that the only one?
@skmedia that’s the only page that I’ve added the “one time pop-up” code to. But, in terms of “where you’ve set local cookies” I don’t understand the question. I, specifically, am not setting up cookies for my site. I’ve put the GDPR notice on my site because Wix sets a huge amount of cookies.
@skmedia I see, thank you for the clarification. So the alteration to “local.getItem” without the “!” didn’t change anything. But I appreciate you trying to help.