asiahomefurnitures Posted February 13, 2020 Share Posted February 13, 2020 Bonjour, Je travaille sur mon site que je tente de développer, sous prestashop 1.7.5.0 et je dois intégrer un module de chat, tout est prêt à fonctionner sauf que je ne trouve pas l'endroit où je dois placer mon script qui est le suivant : <!-- Smartsupp Live Chat script --> <script type="text/javascript"> var _smartsupp = _smartsupp || {}; _smartsupp.key = '020944139101b28d18c5dbc4302932906b5135d3'; window.smartsupp||(function(d) { var s,c,o=smartsupp=function(){ o._.push(arguments)};o._=[]; s=d.getElementsByTagName('script')[0];c=d.createElement('script'); c.type='text/javascript';c.charset='utf-8';c.async=true; c.src='https://www.smartsuppchat.com/loader.js?';s.parentNode.insertBefore(c,s); })(document); </script> En effet le système me dit d'ouvrir ma page web et de le placer entre <head> et </head> Je pensais qu'il s'agissait de la page header.tpl, je la trouve bien dans mon architecture, je l'ouvre mais je ne vois aucun autre script Alors je me pose la question : est-ce ici que je dois coller le script (et à quel endroit) ou sur une autre page car je vois bien une autre page javascript.tpl. Pour être plus clair, voici la page header.tpl : {** * 2007-2017 PrestaShop * * NOTICE OF LICENSE * * This source file is subject to the Academic Free License 3.0 (AFL-3.0) * that is bundled with this package in the file LICENSE.txt. * It is also available through the world-wide-web at this URL: * https://opensource.org/licenses/AFL-3.0 * If you did not receive a copy of the license and are unable to * obtain it through the world-wide-web, please send an email * to [email protected] so we can send you a copy immediately. * * DISCLAIMER * * Do not edit or add to this file if you wish to upgrade PrestaShop to newer * versions in the future. If you wish to customize PrestaShop for your * needs please refer to http://www.prestashop.com for more information. * * @author PrestaShop SA <[email protected]> * @copyright 2007-2017 PrestaShop SA * @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0) * International Registered Trademark & Property of PrestaShop SA *} {block name='header_nav_mobile'} <div class="d-md-none header-nav header-nav-mobile container"> <div class="row"> <div class="col d-md-none"> <span class="slidebar-toggle icon-toggle" data-id-slidebar="nav-slidebar"> <i class="fa fa-bars" aria-hidden="true"></i> </span> <div data-off-canvas="nav-slidebar left push" class="only-mobile"> <button type="button" class="closeSlidebar icon-close" aria-label="Close"></button> <div id="_mobile_links_toggle" class="mb-3 d-md-none"></div> <div class="row"> <div id="_mobile_language_selector" class="col-6 mb-3 d-md-none js-dropdown"></div> <div id="_mobile_currency_selector" class="col-6 mb-3 d-md-none js-dropdown"></div> </div> <div id="_mobile_jxmegamenu"></div> </div> </div> <div class="col-auto separator-list justify-content-end"> <div id="_mobile_jxsearch_toggle" class="col-auto"></div> <div id="_mobile_cart"></div> <div id="_mobile_compare"></div> <div id="_mobile_user_info"></div> <div id="_mobile_Jxwishlist"></div> </div> </div> </div> {/block} {assign var='displayMegaHeader' value={hook h='jxMegaLayoutHeader'}} {if $displayMegaHeader} {$displayMegaHeader nofilter} {else} {block name='header_banner'} <div class="header-banner"> {hook h='displayBanner'} </div> {/block} {block name='header_nav'} <nav class="header-nav"> <div class="container"> <div class="row"> <div class="col d-none d-md-block"> {hook h='displayNav1'} </div> <div class="col-auto separator-list justify-content-end"> {hook h='displayNav2'} </div> </div> </div> </nav> {/block} {block name='header_top'} <div class="header-top"> <div class="container"> <div class="row align-items-center"> <div class="col-12 col-xl-3 text-center text-xl-left mb-md-2 mb-xl-0"> <a href="{$urls.base_url}"> <img class="logo img-fluid" src="{$shop.logo}" alt="{$shop.name}"> </a> </div> <div class="col-12 col-xl-9 d-flex justify-content-center justify-content-xl-end align-items-center"> {hook h='displayTop'} </div> </div> </div> </div> {/block} {/if} Quelqu'un pourrait-il me confirmer ce que je dois faire pour faire tourner le chat svp ? Merci de vos éclaircissements Bien à vous, Yves Link to comment Share on other sites More sharing options...
Mediacom87 Posted February 13, 2020 Share Posted February 13, 2020 Bonjour, https://www.smartsupp.com/help/prestashop/#prestashop-1-7 Link to comment Share on other sites More sharing options...
doekia Posted February 13, 2020 Share Posted February 13, 2020 mon conseil, a mettre dans le footer, et à la fin c'est très bien Link to comment Share on other sites More sharing options...
Modepoker Posted December 15, 2020 Share Posted December 15, 2020 Bonjour à tous, Même sujet. Je dois mettre le code d'un widget freshdesk dans presta 1.7 mais je ne sais pas dans quel fichier le mettre. D'avance merci de votre aide. Le code est : <script> window.fwSettings={ 'widget_id':44000002394 }; !function(){if("function"!=typeof window.FreshworksWidget){var n=function(){n.q.push(arguments)};n.q=[],window.FreshworksWidget=n}}() </script> <script type='text/javascript' src='https://widget.freshworks.com/widgets/44000002394.js' async defer></script> Link to comment Share on other sites More sharing options...
doekia Posted December 15, 2020 Share Posted December 15, 2020 à encadrer avec {literal} {/literal} et/ou mettre un espace après chaque { du script Link to comment Share on other sites More sharing options...
Modepoker Posted December 15, 2020 Share Posted December 15, 2020 Merci pour votre réponse. Sur quelle page du theme svp ? Link to comment Share on other sites More sharing options...
doekia Posted December 15, 2020 Share Posted December 15, 2020 footer.tpl ! Link to comment Share on other sites More sharing options...
Modepoker Posted December 15, 2020 Share Posted December 15, 2020 Super ça marche. J'ai mis dans Head. Merci beaucoup. Link to comment Share on other sites More sharing options...
Vincev60 Posted December 17, 2020 Share Posted December 17, 2020 il y a un module smartsupp disponible sur addons egalement. https://addons.prestashop.com/fr/support-chat-online/21260-smartsupp-free-live-chat.html 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