Joël Gaujard Posted May 2, 2013 Share Posted May 2, 2013 Bonjour, J'ai besoin de votre aide ou retour d'expérience car j'aimerais afficher un module que j'ai crée sur la page d'accueil du thème mobile intégré à la solution. En regardant dans la template index.tpl du theme mobile j'ai pu voir ceci : {hook h="DisplayMobileIndex"} J'ai donc "enregistrer" mon module au hook DisplayMobileIndex mais il n'apparait toujours pas... En fouinant dans le code de la classe hook, j'ai réussi à afficher cette requete SQL : SELECT h.`name` as hook, m.`id_module`, h.`id_hook`, m.`name` as module, h.`live_edit` FROM `ps_module` m INNER JOIN `ps_hook_module` hm ON hm.`id_module` = m.`id_module` INNER JOIN `ps_hook` h ON hm.`id_hook` = h.`id_hook` LEFT JOIN `ps_module_group` `mg` ON mg.`id_module` = m.`id_module` WHERE ( (SELECT COUNT(*) FROM ps_module_shop ms WHERE ms.id_module = m.id_module AND ms.id_shop IN (1)) = 1 ) AND (h.name != "displayPayment") AND (hm.id_shop = 1) AND (mg.`id_group` IN (1)) AND (m.`name` = 'paypal') GROUP BY hm.id_hook, hm.id_module ORDER BY hm.`position` J'ai remarque que la dernière condition dans le WHERE contient m.`name` = 'paypal' !!! Cela signifie qu'il n'y a que Paypal qui a le droit d'etre afficher sur le thème mobile ? Merci pour vos remarques. Link to comment Share on other sites More sharing options...
Joël Gaujard Posted May 3, 2013 Author Share Posted May 3, 2013 Petit UP tant que le sujet est encore chaud... Link to comment Share on other sites More sharing options...
Bondaty and Co Posted May 3, 2013 Share Posted May 3, 2013 Topic déplacé dans la section développement Link to comment Share on other sites More sharing options...
Joël Gaujard Posted May 3, 2013 Author Share Posted May 3, 2013 Merci Muche ! Link to comment Share on other sites More sharing options...
J. Danse Posted May 3, 2013 Share Posted May 3, 2013 Au vu de la requête, il semble y avoir un soucis. La requête stipule bien que le hook est différent que "displayPayment" (celui qui devrait donc afficher PayPal) et pourtant il veut seulement PayPal. En 1.5.4.1, niveau code, ça n'est pas la règle qui est appliquée (normalement). Avant de poursuivre, quelle est la version de PrestaShop utilisée ? Link to comment Share on other sites More sharing options...
Nicko500 Posted April 17, 2014 Share Posted April 17, 2014 (edited) Apparemment ça a un peu changé dans la 1.5.6.1 : La limitation se situe dans /classes/modules/module.php C'est la fonction getPaypalIgnore Voici l'override pour afficher tous les modes de paiement : class Module extends ModuleCore { public static function getPaypalIgnore() { $iso_code = Country::getIsoById((int)Configuration::get('PS_COUNTRY_DEFAULT')); $paypal_countries = array('ES', 'FR', 'PL', 'IT'); } } Edited April 17, 2014 by Nicko500 (see edit history) 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