Jump to content
Courtney

How would I go about installing this pop over?

Recommended Posts

I'm trying to add the JavaScript below to this homepage: https://st-claires.com/

 

It's a snippet from Mailerlite for a pop over. The only instructions Mailerlite has is: 

Install the following snippet of Javascript on every page of your website right before the closing </head> tag.

You only need to add this snippet once, even if you plan to have a few different webforms.

 

I tried adding it to the homepage document and it shows the code now, but no pop over 🤦‍♀️ Any suggestions?

 

<!-- MailerLite Universal -->
<script>
(function(m,a,i,l,e,r){ m['MailerLiteObject']=e;function f(){
var c={ a:arguments,q:[]};var r=this.push(c);return "number"!=typeof r?r:f.bind(c.q);}
f.q=f.q||[];m[e]=m[e]||f.bind(f.q);m[e].q=m[e].q||f.q;r=a.createElement(i);
var _=a.getElementsByTagName(i)[0];r.async=1;r.src=l+'?v'+(~~(new Date().getTime()/1000000));
_.parentNode.insertBefore(r,_);})(window, document, 'script', 'https://static.mailerlite.com/js/universal.js', 'ml');

var ml_account = ml('accounts', '921623', 'g0p9i3j9l5', 'load');
</script>
<!-- End MailerLite Universal -->

 

Thanks!

Share this post


Link to post
Share on other sites

Welcome Courtney! Glad to see you made it to the forums.

Using a programmer's text editor (your hosting account's control panel has one of these), you will open /skins/foundation/templates/main.php (and main.checkout.php).

Here you will find the </head> tag.

You should include these additional two lines of code so that the template rendering engine (Smarty) will not get confused because it uses braces that javascript also uses.

{literal}
Mailerlite javascript goes here...
{/literal}

Then, return to CubeCart's admin and edit the Homepage document. Remove the Mailerlite code from this document.

  • Like 1

Share this post


Link to post
Share on other sites

Thank you bsmither!

Where can I find the programmer text editor from the dashboard and open skins so I can get to the template I need to edit?

I went ahead and used visual studio because I didn't know where it was.

I came up with this: https://github.com/TechQueen88/snippet I just need to test the code that you sent and the one I came up with.

Still trying to find open /skins/foundation/templates/main.php so I can edit the head tag, where do I find this?

 

Thanks again!

Share this post


Link to post
Share on other sites

Do you have a hosting provider where your website is being served? If so, your hosting provider has provided for your use a hosting control panel. One such popular control panel is CPANEL. Another well-known name is PLESK. You will log in to this control panel. In there, you will find a File Manager. The File Manager has a file editing function.

When you get the hosting control panel's File Manager to show you the top directory, and after you enter the 'public_html' directory, there you will find the /skins/ folder.

If you are experimenting with CubeCart on a home server, that server will need to have an editor installed.

CubeCart does not provide an internal editor for customizing the skin code.

 

Share this post


Link to post
Share on other sites

Return to CubeCart's admin and edit the Homepage document. Remove the Mailerlite code from this Homepage document - including the {literal} and {/literal}. After saving the edited document, be sure to click the button "Clear Cache" that is lit up in the upper-right corner.

  • Like 1

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...