Jump to content

Logout when browser closes & zip code error? Help!


Recommended Posts

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 by hunterav (see edit history)
Link to comment
Share on other sites

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

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

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...