Jump to content

choosing language by domain, not by cookie, in presta 1.5


Recommended Posts

Hello,

 

I've got a problem someone solved in this forum, but up to version 1.4.7, I need advice on how to do the same in presta 1.5

 

my setup is:

 

prestashop 1.5 as multistore with:

 

-presta 1.5 shop on domain.es -->only in spanish

-presta 1.5 shop on domain.com ->only in english

 

I set the language selector to redirect the customer to each shop, wich should be totally independent at customer and orders level, but cookies get in the way and generate weird behaviors with the language and the shop operation.

 

So, how do I set the language in the cookies by domain, and not by cookies?

 

The solution posted here to my problem in presta 1.4 involved editing the file FrontController.php after line 116, switchLanguage(), but I cant find it in presta 1.5:

 

 

 

 

if ($_SERVER['SERVER_NAME'] == "psybackdrops.com" OR $_SERVER['SERVER_NAME'] == "www.psybackdrops.com")

$cookie->id_lang = 1;

elseif ($_SERVER['SERVER_NAME'] == "psybackdrops.se" OR $_SERVER['SERVER_NAME'] == "www.psybackdrops.se")

$cookie->id_lang = 4;

 

Help would be very appreciated!

Edited by josecar (see edit history)
Link to comment
Share on other sites

×
×
  • Create New...