Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Advanced Search

Question

  • Answers 4
  • Created
  • Last Reply

Top Posters For This Question

Top Posters For This Question

4 answers to this question

Recommended Posts

  • 1

HI-I tried to insert the code into the header, and the cart shows up on all pages except the 'shop' page, where my Ecwid store is. Also, the cart is not clickable-it's just an icon. When you click on it, nothing happens. If anyone has any ideas how I can fix this--or what I'm doing wrong--I'd love your help!!

Link to post
  • 0

Well I figured it after several hours of trial and error. I hope I can make someones day who comes searching in the future. 

Put the following code into the header section of code injection 

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>

<script>
$( document ).ready(function() {
	$( ".header-actions-action.header-actions-action--social" ).append("<div class='ec-cart-widget'></div>");
});
</script>

and then a bit of css to make the bag the same size as the other icons and change the color to be the same. 

.ec-minicart--no-shape{
  padding: 0px !important; 
}
.ec-minicart__icon{
  height: 30px !important;
  width: 30px !important;
}
.ec-minicart__icon .icon-default path[stroke], .ec-minicart__icon .icon-default circle[stroke]{
  stroke: #(color code you want) !important;
}

 

Edited by clarson1229
Link to post
  • 0

@AKAVAN I put the code below on every page that doesn't have an Ecwid store on it.

And the 2nd code below is put on every page with an Ecwid store on it.

I've done some CSS design changes you'll have to update or remove.

Code for pages without Ecwid Store

<div data-fixed-shape="RECT" data-layout="BIG_ICON_TITLE_SUBTOTAL" data-icon="cart" data-horizontal-indent="50px" data-responsive="FALSE" class='ec-cart-widget' style="color: #ffffff00;"></div>
<div>
<script data-cfasync="false" type="text/javascript" 
src="https://app.ecwid.com/script.js?28194192&data_platform=code" 
charset="utf-8"></script><script>Ecwid.init();</script></div>

Code for pages with Ecwid Store

<div data-fixed-shape="RECT" data-layout="BIG_ICON_TITLE_SUBTOTAL" data-icon="cart" data-horizontal-indent="50px" data-responsive="FALSE" class='ec-cart-widget' style="color: #ffffff00;"></div>

 

Link to post

Create an account or sign in to comment

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


×
×
  • Create New...