mwane Posted May 3, 2011 Share Posted May 3, 2011 Bonjour, je suis dans cette fonction static :-----------------------------------------------------------static public function getByProduct($id_product, $p = 1, $n = null) { if (!Validate::isUnsignedId($id_product)) die(Tools::displayError()); $validate = Configuration::get('PRODUCT_COMMENTS_MODERATE'); $p = intval($p); $n = intval($n); if ($p <= 1) $p = 1; if ($n != null AND $n <= 0) $n = 5; if(intval($cookie->id_lang) == 0 || intval($cookie->id_lang)== NULL) { $id_langP = Configuration::get('PS_LANG_DEFAULT'); } else { $id_langP = intval($cookie->id_lang); } ----------------------------------------------------------------Comment fait t-on pour récupérer l'id de la langue dans une fonction statique : voici ce que j'ai fais dans la fonction: if(intval($cookie->id_lang) == 0 || intval($cookie->id_lang)== NULL) { $id_langP = Configuration::get('PS_LANG_DEFAULT'); } else { $id_langP = intval($cookie->id_lang); }Mais $id_langP retourne la valeur zéro.Cordialement,merlin Link to comment Share on other sites More sharing options...
Patric Posted May 5, 2011 Share Posted May 5, 2011 Topic déplacé. Merci de poster dans les bonnes sections sous peine de suppression. 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