AbanteCart Community

Shopping Cart Operations => Support => General Support => Topic started by: chris17300 on October 02, 2025, 12:47:04 AM

Title: add JavaScript code in head section
Post by: chris17300 on October 02, 2025, 12:47:04 AM
Hi,

I would know if it is possible to add JavaScript code in head section.

Thanks in advance for any answer!

Have a good day
Title: Re: add JavaScript code in head section
Post by: Basara on October 02, 2025, 05:44:48 AM
Hello.

Yes, you can add JavaScript to the <head>. There are a few ways to do it:
   1.   HTML Block – Create an HTML block with your <script> code and assign it to the Header section in Layouts.
   2.   Edit Template – Add your code directly in /storefront/view/<your_template>/common/header.tpl (https://github.com/abantecart/abantecart-src/blob/master/public_html/extensions/novator/storefront/view/novator/template/common/head.tpl#L74).
   3.   Extension – Create or use a small extension to inject scripts (upgrade-safe).
Title: Re: add JavaScript code in head section
Post by: chris17300 on October 03, 2025, 09:13:26 AM
Thank you for your response  :D