@rthur Posted January 21, 2022 Share Posted January 21, 2022 (edited) Salut, J'essaie d'jouter un code JS dans mon footer mais cela me crée un erreur : (1/1) SmartyCompilerException Syntax error in template "file:/home/***/public_html/shop/themes/classic/templates/_partials/footer.tpl" on line 75 "<script type="text/javascript">window.addEventListener('load', function(){cal.initBadgeWidget({ url: 'https://url.com/monsite/rdv', text: 'Reserver un creneau', color: '#0069ff', textColor: '#ffffff', branding: true }); } )</script>" - Unexpected ".", expected one of: "}" Voici le code d'origine <link href="https://assets.url.com/assets/external/widget.css" rel="stylesheet"> <script src="https://assets.url.com/assets/external/widget.js" type="text/javascript" async></script> <script type="text/javascript">window.addEventListener('load', function(){Cal.initBadgeWidget({ url: 'https://url.com/monsite/rdv', text: 'Reserver un creneau', color: '#0069ff', textColor: '#ffffff' }); } )</script> Je suis sous la version 1.7.4.3 Une idée du problème ? Merci Edited January 21, 2022 by @rthur (see edit history) Link to comment Share on other sites More sharing options...
Mediacom87 Posted January 21, 2022 Share Posted January 21, 2022 (edited) Bonjour, la doc de calendly ne présente pas le même code que celui-ci : <script type="text/javascript">window.onload = function() { Calendly.initBadgeWidget({ url: 'https://calendly.com/highbridge-team/sales', text: 'Schedule a Consultation', color: '#0069ff', textColor: '#ffffff', branding: false }); }</script> Edit : bon je me rends compte que ce n'est pas la doc officielle donc peut être que leur script a changé. Edited January 21, 2022 by Mediacom87 (see edit history) Link to comment Share on other sites More sharing options...
@rthur Posted January 21, 2022 Author Share Posted January 21, 2022 Just now, Mediacom87 said: Bonjour, la doc de calendly ne présente pas le même code que celui-ci : <script type="text/javascript">window.onload = function() { Calendly.initBadgeWidget({ url: 'https://calendly.com/highbridge-team/sales', text: 'Schedule a Consultation', color: '#0069ff', textColor: '#ffffff', branding: false }); }</script> C'est un autre code car celui de base ne fonctionne pas rien ne s'affiche donc ils m'ont proposé celui-ci en me disant que ca doit etre un souci d'un conflit de fonction window.onload 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