Jump to content

How to add custom code to the site-wide header?

Recommended Posts

Site URL: https://www.sugardaisyboutique.com/

Hi there, can someone help me with adding a custom code to my site-wide header?

I have a shopping cart from a separate eCom provider (my POS system) that I want to integrate into the site. The code is: <div class='ec-cart-widget'></div>

I'd like it to ideally be up where the button, or social icons are... But I'm unsure how to get it there. I have attached a screenshot of the directions I've been given from my POS, as well as a screenshot of where I'd like it to appear.

Can someone help me?

Thank you!

Screen Shot 2021-04-27 at 1.03.33 PM.png

Screen Shot 2021-04-27 at 1.04.15 PM.png

Link to comment
  • Replies 3
  • Views 692
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

On 4/28/2021 at 6:43 PM, SugarDaisy said:

Password to view site is ready2go

Add to Settings > Advanced > Code injection > Footer

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script>
$(document).ready(function() { 
		$('<div class="ec-cart-widget"></div>').insertBefore('.header-display-desktop .header-actions-action');
	});
</script>

 

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.