damdam27 Posted May 30, 2017 Share Posted May 30, 2017 Bonjour, Quand j'ajoute une image dans un .tpl, exemple : <img src=“{$img_ps_dir}panier.png”/> Ca ne trouve pas l'image car le navigateur interprête comme chemin de l'image : <img src=“localhost/prestashop/fr"http://localhost/prestashop/img/panier.png"> Est ce que quelqu'un a déjà rencontré ce bug sachant que mon site est hebergé en local? Merci d'avance Link to comment Share on other sites More sharing options...
doekia Posted May 30, 2017 Share Posted May 30, 2017 (edited) normal {$img_dir} !! avec l'image dans le répertoire image du thème Edited May 30, 2017 by doekia (see edit history) Link to comment Share on other sites More sharing options...
damdam27 Posted May 30, 2017 Author Share Posted May 30, 2017 Oui mais pourquoi ca me rajoute localhost/prestashop/fr devant l'adresse ? Link to comment Share on other sites More sharing options...
damdam27 Posted May 30, 2017 Author Share Posted May 30, 2017 Et j'ai le meme probleme si par exemple je crée un lien : <a href="http//www.google.fr">test</a> Ca interprete localhost/prestashop/fr"http://www.google.fr" Link to comment Share on other sites More sharing options...
doekia Posted May 30, 2017 Share Posted May 30, 2017 http//www.google.fr tu veux pas essayer d'observer et de comprendre comment marche le protocol http? c'est http://www.google.fr Oui le : est foutrement important. Après, ces 2 variables différentes img_dir et img_ps_dir sont définie/utilisés ici: classes/ConfigurationTest.php:66: 'img_dir' => 'img', classes/ConfigurationTest.php:266: public static function test_img_dir($dir) classes/controller/FrontController.php:504: 'img_dir' => _THEME_IMG_DIR_, classes/controller/FrontController.php:1664: 'col_img_dir' => _PS_COL_IMG_DIR_ classes/controller/AdminController.php:1969: 'img_dir' => _PS_IMG_, classes/pdf/HTMLTemplate.php:139: 'img_ps_dir' => 'http://'.Tools::getMediaServer(_PS_IMG_)._PS_IMG_, classes/pdf/HTMLTemplateSupplyOrderForm.php:175: 'img_ps_dir' => 'http://'.Tools::getMediaServer(_PS_IMG_)._PS_IMG_, classes/controller/FrontController.php:495: 'img_ps_dir' => _PS_IMG_, Donc si tu as des résultats étranges, c'est probablement que ta configuration media server et/ou domain, domain_ssl est légèrement kamoulox 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