Chrims Posted June 4, 2015 Share Posted June 4, 2015 (edited) Hello, is there a way to make hooks in the module installation language specific? So lets say i want for each language a different .js-File added to the DisplayHeader Thank you Edited June 4, 2015 by Chrims (see edit history) Link to comment Share on other sites More sharing options...
jsmit2 Posted June 4, 2015 Share Posted June 4, 2015 You can get the language id and put an if around the addJS function like so: $id_lang = $cookie->id_lang; if($id_lang == 1) $this->context->controller->addJS($this->_path.'/views/js/front_en.js'); else $this->context->controller->addJS($this->_path.'/views/js/front_nl.js'); Link to comment Share on other sites More sharing options...
Chrims Posted June 4, 2015 Author Share Posted June 4, 2015 okay i get it. Is there a way for a multi language link to the cart? Link to comment Share on other sites More sharing options...
vekia Posted June 4, 2015 Share Posted June 4, 2015 hello prestashop by default creates language-specific link to cart $link->getPageLink($order_process, true) this will generate link to cart page with correct language definition Link to comment Share on other sites More sharing options...
Chrims Posted June 5, 2015 Author Share Posted June 5, 2015 perfekt, many thanks 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