Jump to content

How to add Ecwid cart to navigation header in Squarespace

Recommended Posts

This isn’t CSS, it is HTML. It can be inserted in Settings > Advanced > Code Injection.

About me: I've been a SQSP User for 18 yrs. I was invited to join the Circle when it launched in 2016. I have been a Circle Leader since 2017. I don't work for Squarespace. I value honesty, transparency, diversity and good design ♥.
Work: I founded and run SF.DIGITAL, building Squarespace Extensions to supercharge your commerce website. 
Content: Views and opinions are my own. Links in my posts may refer to SF.DIGITAL products or may be affiliate links.
Forum advice is free. You can thank me by clicking one of the feedback emojis below. Coffee is optional.

Link to comment
On 2/18/2021 at 12:24 AM, paul2009 said:

This isn’t CSS, it is HTML. It can be inserted in Settings > Advanced > Code Injection.

Figured out step one of the issue: the icon is there in the header, but it remains hidden beneath the header's theme. In other words, it doesn't show up unless I make my header color theme "transparent". Any way I can get the icon to appear on top of a color theme? Thank you!

Link to comment
On 2/25/2021 at 10:17 AM, AL-FQR said:

Figured out step one of the issue: the icon is there in the header, but it remains hidden beneath the header's theme. In other words, it doesn't show up unless I make my header color theme "transparent". Any way I can get the icon to appear on top of a color theme? Thank you!

What is access password?

image.thumb.png.47f270f5620c3fafd114838b091cd0ac.png

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
On 3/7/2021 at 9:36 PM, nicolettely said:

How do you get this Ecwid Shopping bag aligned right with the existing header elements?  . I would love for it to be next to the button. 

www.tothebrimrefill.com

Hi. It looks like you solved this?

Footer on tablet doesn't look good. Do you want to resize contact column width?

image.thumb.png.3b31d51aa120b016c539eec484d2d471.png

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
On 3/15/2021 at 5:01 AM, tuanphan said:

Hi. It looks like you solved this?

Footer on tablet doesn't look good. Do you want to resize contact column width?

 

Thanks for pointing that out! I will fix the footer, but I still need help with the shopping bag. I had to delete it temporarily  until I figure out what code I need. 

Here is the code to add to  the site:

<div class='ec-cart-widget'></div>

What do I need to add to line it up to the left of the social symbols?

 

Link to comment
On 3/19/2021 at 9:20 PM, nicolettely said:

@tuanphan I added the shopping bag back- Its hidden under the announcement banner on my screen. How can I move it down into the navigation bar? 

Add to Design > Custom CSS

.ec-cart-widget {
    top: 40px;
    z-index: 999;
    position: relative;
    right: 50px;
}

 

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
On 3/22/2021 at 10:01 PM, nicolettely said:

Thanks so much @tuanphan! Hate to bother you with this more, but is there a way to position it so it doesn't overlap any navigation on tablet and mobile? 

Try adding to Design > Custom CSS

/* ecwid on mobile */
@media screen and (max-width:991px) {
.ec-cart-widget {
    top: 150px;
    right: 0;
}
}

 

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

HI @tuanphan

I was wondering if i can get some assistance for my site - universalbakehouse.my/beta. 

I am trying to move my cart to the right hand side as well, but it's still not working. 

the code i'm using is this

.ec-cart-widget {
    top: 40px;
    z-index: 999;
    position: relative;
    right: 50px;
}

 

Currently my theme has this css that was suggested by you previously

@media screen and (max-width:767px) {
/* Careers */
body#collection-5f522ac37f1ce932fd6c872b #page section:first-child {
    min-height: 20vh;
    margin-top: 5vh;
}
/* about us slide */
body#collection-5f4efaea74b92128fd3cf61e .gallery-fullscreen-slideshow {
    height: 45vh !important;
}
/* homepage first slide */
.homepage .gallery-fullscreen-slideshow {
    height: 45vh !important;
}

}

 

Hoping you will be able to help 🙂
Thanks in advance. 

Edited by UniversalBakehouse
Link to comment
On 3/27/2021 at 7:42 PM, UniversalBakehouse said:

HI @tuanphan

I was wondering if i can get some assistance for my site - universalbakehouse.my/beta. 

I am trying to move my cart to the right hand side as well, but it's still not working. 

the code i'm using is this


.ec-cart-widget {
    top: 40px;
    z-index: 999;
    position: relative;
    right: 50px;
}

 

Currently my theme has this css that was suggested by you previously


@media screen and (max-width:767px) {
/* Careers */
body#collection-5f522ac37f1ce932fd6c872b #page section:first-child {
    min-height: 20vh;
    margin-top: 5vh;
}
/* about us slide */
body#collection-5f4efaea74b92128fd3cf61e .gallery-fullscreen-slideshow {
    height: 45vh !important;
}
/* homepage first slide */
.homepage .gallery-fullscreen-slideshow {
    height: 45vh !important;
}

}

 

Hoping you will be able to help 🙂
Thanks in advance. 

Hi. The url doesn't exist. Can you check it again?

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
  • 10 months later...
17 hours ago, smarta said:

I'm having issues getting the Ecwid shopping bag showing up in the navigation.

There are some errors on the site right now, so it's difficult to test externally:

  • The site isn't connecting to the Ecwid store - I can't see any products. 
  • Some script is expecting jQuery but this hasn't been added to the site.

That said, I think you'll need some amended CSS for the site to resolve the cart positioning issue. Instead of the CSS you've used from the thread above, try this:

.ec-cart-widget {
  position: absolute;
  right: 150px;
  top: 49px;
  z-index: 11;
}

 

About me: I've been a SQSP User for 18 yrs. I was invited to join the Circle when it launched in 2016. I have been a Circle Leader since 2017. I don't work for Squarespace. I value honesty, transparency, diversity and good design ♥.
Work: I founded and run SF.DIGITAL, building Squarespace Extensions to supercharge your commerce website. 
Content: Views and opinions are my own. Links in my posts may refer to SF.DIGITAL products or may be affiliate links.
Forum advice is free. You can thank me by clicking one of the feedback emojis below. Coffee is optional.

Link to comment

THANK YOU @paul2009!! That totally fixed it. You rock!! 

6 hours ago, paul2009 said:

There are some errors on the site right now, so it's difficult to test externally:

  • The site isn't connecting to the Ecwid store - I can't see any products. 
  • Some script is expecting jQuery but this hasn't been added to the site.

That said, I think you'll need some amended CSS for the site to resolve the cart positioning issue. Instead of the CSS you've used from the thread above, try this:

.ec-cart-widget {
  position: absolute;
  right: 150px;
  top: 49px;
  z-index: 11;
}

 

 

Link to comment
  • 4 weeks later...

Hi - I have managed to get my ECWID cart icon over to the right, but want to make it so it is responsive and stays in that space regardless of size of window or device being used to view it. Also - since it putting it in code injection header I no longer am able to view the store.

Site:  magnolia-sawfish-bdxx.squarespace.com

Pass: Employee180!

 

This is the code I was using, that I took down in order to have the store visible while editing:

<div data-layout="MEDIUM_ICON_COUNTER" class='ec-cart-widget'></div>
<div><script data-cfasync="false" type="text/javascript"
src="https://app.ecwid.com/script.js?72483289&data_platform=code" 
charset="utf-8"></script><script>Ecwid.init();</script></div>

Edited by dv_louise_designs
Link to comment
On 2/25/2022 at 2:47 AM, dv_louise_designs said:

Hi - I have managed to get my ECWID cart icon over to the right, but want to make it so it is responsive and stays in that space regardless of size of window or device being used to view it. Also - since it putting it in code injection header I no longer am able to view the store.

Site:  magnolia-sawfish-bdxx.squarespace.com

Pass: Employee180!

 

This is the code I was using, that I took down in order to have the store visible while editing:

<div data-layout="MEDIUM_ICON_COUNTER" class='ec-cart-widget'></div>
<div><script data-cfasync="false" type="text/javascript"
src="https://app.ecwid.com/script.js?72483289&data_platform=code" 
charset="utf-8"></script><script>Ecwid.init();</script></div>

It looks like you removed icon? We don't see ecwid icon on header now

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
  • 5 weeks later...
  • 10 months later...

Hello,

I'm trying to find code to add the Ecwid Shopping Cart to the navigation panel / header panel of the Squarespace site.

https://distriktbymia.ie/store

I have the code for the Ecwid Store widget (<div class='ec-cart-widget'></div>) but don't know if it is possible to add / replace the Squarespace shopping cart with the Ecwid code in the navigation. I would like the cart to be visible on all page on the website so the customer can check-out easily from any page.

Is there code to do this and where do I add it? 

Grateful for any insights on this

 

Screenshot 2023-02-07 at 13.39.14.png

Link to comment

Try adding this to Settings > Advanced > Code Injection > Footer

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.1/jquery.min.js"></script>
<script>
  $(document).ready(function() { 
		$('div#block-yui_3_17_2_1_1667325983187_7107').appendTo('.header-actions-action.header-actions-action--social');
	});
</script>
<style>
  header#header .ec-minicart__icon .icon-default path[stroke] {
    stroke: var(--navigationLinkColor);
}
  .header-actions-action.header-actions-action--social {
    flex-direction: row-reverse;
    align-items: center;
}
</style>

 

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
  • 3 weeks later...

hi @tuanphan and @paul2009, i have the same problem with my shopping cart. How can i get my edwic cart (marked with red) in the exact place of the squarespace cart, so that it looks good on both desktop and mobile? 

the password for my shop page is illusterreshop if you need it, it is still offline: https://illusterre-sample.squarespace.com/config/pages . The url to my website is https://illusterre.nl/ . I removed the shopping cart of squarespace so only the edwic one is visible. 

Edit: I managed to get it on the right side, and now it is looking good in the mobile version, but the position is off in the desktop (and probably tablet) version. Also my logo is now off centre. Is there maybe some code to fix this for all devices?

Thanks in advance! ❤️

WhatsApp Image 2023-02-27 at 22.24.01 (1).jpeg

WhatsApp Image 2023-02-27 at 22.24.01.jpeg

Edited by Illusterre
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.