Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #948732

    Hi there!

    I’m not using the cookie popup for that, I’m using it as a message, it seems once i dismiss it once, it never comes up again when I revisit the site.

    Is there a way to have it come up each visit?

    #949552

    Hey,

    Please go to enfold/js/avia-snippet-cookieconsent.js file in Appearance > Editor and find

    
    date.setTime(date.getTime()+(CookieDays*24*60*60*1000));

    and change it to following

    
    date.setTime(date.getTime()+(30 * 60 * 1000));

    That would reset after every 30 minutes.

    Best regards,
    Yigit

    #952725

    Hi Yigit

    Just a short follow up on this:
    What does (CookieDays*24*60*60*1000) indicate – or: How do I see or set expiration date? Could I prolong to “forever” if wanted?

    Best regards

    #953210

    Hi nonne,

    Here is a thread for you to consider
    https://stackoverflow.com/questions/532635/javascript-cookie-with-no-expiration-date

    If you need further assistance please let us know.
    Best regards,
    Victoria

    #953269

    Hi Victoria

    Thanks for answering.
    However I don’t quite get the idea with the article you are referrring to…

    For changes of cookie consent expiration data Yigit was referring to enfold/js/avia-snippet-cookieconsent.js
    – this line: date.setTime(date.getTime()+(CookieDays*24*60*60*1000));

    What I was asking was: What does (CookieDays*24*60*60*1000) indicate – or: How do I see or set expiration date? Could I prolong to “forever” if wanted?

    Best regards

    #953829

    Hi,

    You can try changing the code to following one to set expiration date to 10 years

    
    date.setTime(date.getTime()+(10 * 365 * 24 * 60 * 60));
    

    Best regards,
    Yigit

    #953836

    Hi Yigit

    Thanks a lot – as usual :-)

    Just to understand: The original one:
    date.setTime(date.getTime()+(CookieDays*24*60*60*1000));
    – did that mean 24 hours?

    And finally: “CookieDays” is missing in your new code? Is that OK?

    Very best regards

    #953843

    Hey,

    Date is set using current date + 10 * 365 * 24 * 60 * 60 (315360000 seconds in total which corresponds 10 years). You can adjust values without using “CookieDays” in the code :)

    Cheers!
    Yigit

    #954022

    Hi again Yigit

    Thanks a lot. Got it :-)

    Best regards

    #954024

    Hi,


    @nonne
    You are welcome! :)

    We will keep the thread open and will wait to hear from the creator of this thread. If you have any other questions or issues, please feel free to start a new thread.

    Best regards,
    Yigit

    #972792

    Hi, to set 7 days
    date.setTime(date.getTime()+(CookieDays*7*24*60*60*7));
    is it correct?
    However there is a problem. After accepting cookies, going to other pages of the site, the cookies window reappears!

    • This reply was modified 6 years, 6 months ago by lion73.
    #974083

    Hi,

    Thanks for the update. That should not be the case after confirming the consent. Did you check if cookies is enabled in your browser?

    Best regards,
    Ismael

    #974421

    Hi ismael, of course, cookies are enabled…

    #974682

    Hi,

    Thanks for the update. Try to replace “CookieDays” with “7”. Default cookie consent expiry is set to 60 days.

    date.setTime(date.getTime()+(7*24*60*60*1000));
    

    Best regards,
    Ismael

Viewing 14 posts - 1 through 14 (of 14 total)
  • You must be logged in to reply to this topic.