Javascript Code einbinden / Shopware 5

Hallo in die Runde, ich möchte in Shopware 5 einfach nur ein JS Code einbinden. Allerdings klappt das nicht so wie ich das gerne möchte. Ich habe mir overheat.de gegönnt, und leider haben die Jungs wohl das Plugin ihres Heatmap Tool noch nicht fertig. Bisher habe ich es dann versucht es via FTP in die header.tpl einzubinden. Das hat nur leider nicht geklappt. Und zwar so: {block name="frontend\_index\_header\_javascript\_jquery" append}<script type="text/javascript"> snippet </script> {/block} Nur leider wirft mir das System ständig Fehler aus. In der Version 4 von Shopware hat das problemlos funktioniert. In der 5er klappt das leider nicht. Hat da jemand eine Lösung? Danke Euch für die Antworten. Grüße S

Guten Tag, versuch es mal folgendermaßen: {block name="frontend\_index\_header\_javascript\_jquery\_lib" append} <script>console_log("hi");</script>{/block} Das Problem ist wahrscheinlich, dass der Blockname bei Dir falsch ist. “frontend_index_header_javascript_jquery_lib” statt “frontend_index_header_javascript_jquery” Viele Grüße

1 „Gefällt mir“

Hi, danke für die Antwort. Aber der Fehler ist der gleiche, hier die Fehlerausgabe: Fatal error: Uncaught exception 'SmartyCompilerException' with message 'Syntax Error in template "/var/www/vhosts/serverseite.de/httpdocs/themes/Frontend/serverseite/frontend/index/header.tpl" on line 86 "(function(o,v,e,r,t,a,g){o[t]=o[t]||function(){" - Unexpected "[", expected one of: "}" , " " , ATTR' in /var/www/vhosts/serverseite.de/httpdocs/engine/Library/Smarty/sysplugins/smarty\_internal\_templatecompilerbase.php:657 Stack trace: #0 /var/www/vhosts/serverseite.de/httpdocs/engine/Library/Smarty/sysplugins/smarty\_internal\_templateparser.php(3144): Smarty\_Internal\_TemplateCompilerBase-\>trigger\_template\_error() #1 /var/www/vhosts/serverseite/httpdocs/engine/Library/Smarty/sysplugins/smarty\_internal\_templateparser.php(3209): Smarty\_Internal\_Templateparser-\>yy\_syntax\_error(64, '[') #2 /var/www/vhosts/serverseite/httpdocs/engine/Library/Smarty/sysplugins/smarty\_internal\_smartytemplatecompiler.php(105): Smarty\_Internal\_Templateparser-\>doParse(64, '[') #3 /var/www/vhosts/serverseite/httpdocs/ in /var/www/vhosts/serverseite/httpdocs/engine/Library/Smarty/sysplugins/smarty\_internal\_templatecompilerbase.php on line 657 503 Service Unavailable

http://www.smarty.net/docsv2/de/languag … iteral.tpl Weiterhin kannst du JS Code auch in deinen Theme Einstellungen im Reiter Konfiguration hinterlegen: https://drive.google.com/file/d/0B6YdSl … p=drivesdk Dort einfach den

1 „Gefällt mir“