Post by Majna » Fri Nov 16, 2018 2:11 am

Hi

How can I add some codes in <head> </head> or <body> </body>

Can anybody help me please...........

Thank you

Active Member

Posts

Joined
Sat Jul 22, 2017 8:00 pm

Post by thekrotek » Fri Nov 16, 2018 2:25 am

Your question is strange... You just add it. If you don't even know, how to work with HTML, I wouldn't suggest you to do it yourself.

Professional OpenCart extensions, support and custom work.
Contact me via email or Skype by support@thekrotek.com


User avatar
Expert Member

Posts

Joined
Sun Jul 03, 2016 12:24 am


Post by Majna » Fri Nov 16, 2018 3:22 am

thekrotek wrote:
Fri Nov 16, 2018 2:25 am
Your question is strange... You just add it. If you don't even know, how to work with HTML, I wouldn't suggest you to do it yourself.

I am asking that are there any special module or extension in open cart to add some scripts inside head tag

Thank you

Active Member

Posts

Joined
Sat Jul 22, 2017 8:00 pm

Post by IP_CAM » Fri Nov 16, 2018 3:51 am

Well, next time, you might better look in the OC Extension Section first: ::)
Ernie
---
Custom CSS by viethemes
https://www.opencart.com/index.php?rout ... n_id=20565
Custom JavaScript by viethemes
https://www.opencart.com/index.php?rout ... n_id=20566
Add CSS Code From Admin / Backend
https://www.opencart.com/index.php?rout ... n_id=25114
Add Javascript From Admin / Backend
https://www.opencart.com/index.php?rout ... n_id=28366
Custom CSS, Javascript and Code
https://www.opencart.com/index.php?rout ... n_id=26410

My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by Johnathan » Fri Nov 16, 2018 6:04 am

If you want to manually add the code yourself, just edit your theme's header template file:

/catalog/view/theme/YOURTHEME/template/common/header.tpl

Image Image Image Image Image


User avatar
Administrator

Posts

Joined
Fri Dec 18, 2009 3:08 am


Post by Majna » Sat Nov 17, 2018 5:09 pm

Johnathan wrote:
Fri Nov 16, 2018 6:04 am
If you want to manually add the code yourself, just edit your theme's header template file:

/catalog/view/theme/YOURTHEME/template/common/header.tpl

Thank you so much Johnathan

I added the code in the same location. I have a question. is it effective for all other pages like products, products category ?

Thank you

Active Member

Posts

Joined
Sat Jul 22, 2017 8:00 pm

Post by Johnathan » Mon Nov 19, 2018 10:24 pm

Yes, the header.tpl file is loaded on every single page in your site.

Image Image Image Image Image


User avatar
Administrator

Posts

Joined
Fri Dec 18, 2009 3:08 am


Post by Majna » Sun Dec 23, 2018 12:39 am

Johnathan wrote:
Mon Nov 19, 2018 10:24 pm
Yes, the header.tpl file is loaded on every single page in your site.

Thank you.

Active Member

Posts

Joined
Sat Jul 22, 2017 8:00 pm

Post by opencartzu » Fri Aug 05, 2022 2:57 am

hello, I would like to put a .js code before </html> for a mailerlite popup for the newsletter. I mention that I tried from the file /catalog/view/theme/fastor/template/common/header.tpl but I didn't succeed. Can someone help me? Thanks

The js code is:

<!-- MailerLite Universal -->
<script>
(function(w,d,e,u,f,l,n){w[f]=w[f]||function(){(w[f].q=w[f].q||[])
.push(arguments);},l=d.createElement(e),l.async=1,l.src=u,
n=d.getElementsByTagName(e)[0],n.parentNode.insertBefore(l,n);})
(window,document,'script','https://assets.mailerlite.com/js/universal.js','ml');
ml('account', '115781');
</script>
<!-- End MailerLite Universal -->

New member

Posts

Joined
Sun Jul 09, 2017 11:48 am
Who is online

Users browsing this forum: No registered users and 71 guests