awcode Posted March 2, 2015 Share Posted March 2, 2015 I have a module that needs to display a popup once and then not display again for 24 hours. Normally doing this with a cookie is a trivial task, however the prestashop cache is causing issues. I am using context->cookie->__set and context->cookie->key which are working ok. But the big problem is as follows:- 1) Set cookie and echo value in comment as a test - nothing comes up. 2) Clear cache - test value shows. 3) Open different browser - test value from previous session in other browser is shown. Clearly the cookie code is working and running, but only runs once and is then stored in cache and retrieved for all subsequent users. I need this code to actually run on each request so it can determine the cookie value relative to the current active user. This is currently running in hookFooter if it makes a difference. Is there any way that I can either disable cache for this specific hook or module or otherwise force the code to actually run? Link to comment Share on other sites More sharing options...
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!Register a new account
Already have an account? Sign in here.Sign In Now