hunterav Posted August 22, 2012 Share Posted August 22, 2012 (edited) Hi all, I need help configuring the cookie to delete when the browser closes especially when logged into the back office. I have tried changing values and adding other lines of script but I always get a blank screen in return after I've uploaded the changes. Second, I have a few zip codes in New York that begins with a 0 but when ever I enter these I get 'error' I've looked in county.php but I don't see where I can change this. Any help would be appreciated. Thank You Edited August 22, 2012 by hunterav (see edit history) Link to comment Share on other sites More sharing options...
El Patron Posted August 22, 2012 Share Posted August 22, 2012 the check of your zip code is done in classes/validate.php function isPostCode as for your cookie delete on browser close, there are a few threads on this, here is one: http://www.prestashop.com/forums/topic/120515-logout-when-browser-is-closed/ Link to comment Share on other sites More sharing options...
hunterav Posted August 23, 2012 Author Share Posted August 23, 2012 Yeah, I tried the code in the link previously but as I stated before when ever I make changes to the Cookie.php I get a blank screen in return when I visit the website. Was hoping someone can point me to something that works with the current Prestashop version. Also forgot to say that I'm using 1.4.8.3 Also not sure what to change in Validate.php for it to accept the zip code. public static function isPostCode($postcode) { return empty($postcode) OR preg_match('/^[a-zA-Z 0-9-]+$/', $postcode); } public static function isZipCodeFormat($zip_code) { if (!empty($zip_code)) return preg_match('/^[NLCnlc -]+$/', $zip_code); return true; } Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now