Page 1 of 1

[SOLVED] Mailchimp script in opencart 3.0.3.1

Posted: Thu Mar 21, 2019 5:41 pm
by onlinepixel
Hi,
I have this problem with my mail chimp script :

<script id="mcjs">!function(c,h,i,m,p){m=c.createElement(h),p=c.getElementsByTagName(h)[0],m.async=1,m.src=i,p.parentNode.insertBefore(m,p)}(document,"script","https://chimpstatic.com/mcjs-connected/ ... );</script>

I placed this code before </head> tag and it still does not show conected with my accout in mailchimp. I have opencart 3.0.3.1 . It is another way to place that code in opencart 3? In opencart 2.3 it was the same..placed before <head> tag and i dint have any problem. Thank you.

Re: Mailchimp script in opencart 3.0.3.1

Posted: Fri Mar 22, 2019 8:20 pm
by paulfeakins
When you view the source of the page, is that code appearing?

Re: Mailchimp script in opencart 3.0.3.1

Posted: Tue Mar 26, 2019 10:59 pm
by onlinepixel
Yes...even twice :'( I chat with mailchimp suport and they notified me that they see the code twice!

Re: Mailchimp script in opencart 3.0.3.1

Posted: Tue Mar 26, 2019 11:05 pm
by paulfeakins
onlinepixel wrote:
Tue Mar 26, 2019 10:59 pm
Yes...even twice :'( I chat with mailchimp suport and they notified me that they see the code twice!
That could be the problem then! Perhaps you also pasted it in the admin?

Re: Mailchimp script in opencart 3.0.3.1

Posted: Mon Dec 07, 2020 12:21 pm
by chobits332
I have the same issue. code is only in once. tried moving it into footer, on homepage, and in head. Nothing happened.

Re: Mailchimp script in opencart 3.0.3.1

Posted: Mon Dec 07, 2020 12:30 pm
by sw!tch
You need to refresh your theme cache anytime you make a change to twig and have cache enabled.

Admin-> Dashboard -> Cog Icon -> refresh the theme cache

If you also have modifications, then you should refresh the modification cache as well.

Admin-> Extension-> Modification -> refresh icon.

Re: Mailchimp script in opencart 3.0.3.1

Posted: Mon Dec 07, 2020 3:19 pm
by Voltagescot
You could try putting it on the Google analytics module. But if you have code there space it out ;)

Re: Mailchimp script in opencart 3.0.3.1

Posted: Sun Dec 20, 2020 8:43 am
by chobits332
chobits332 wrote:
Mon Dec 07, 2020 12:21 pm
I have the same issue. code is only in once. tried moving it into footer, on homepage, and in head. Nothing happened.

Its not cache, But I did get it to work. The script was fine, the form on mail chimps side wasn't set up correctly. I created the proper form there and now it pops up just fine on bolterbunny.com

Re: Mailchimp script in opencart 3.0.3.1

Posted: Fri Nov 05, 2021 9:39 pm
by MajorPain
Just came across this post and having the same issue. I've added the embedded code from mailchimp like the code above, placed right above </head> in the header.twig. I did this 3 weeks ago and refreshed the cache several times but still nothing. Tried adding it after the analytics code for laughs and still nothing. On our old website Arastta that didn't use twig, it worked fine. The result was a pop up box bottom right corner to signup to the newletter.

Re: Mailchimp script in opencart 3.0.3.1

Posted: Fri Nov 05, 2021 10:00 pm
by MajorPain
All good now. Checked with mailchimp and though it showed the website was active, it apparently wasn't. Their frontend shows incorrect website status at times.