Ecwid Shopping Cart (custom code) stopped working

Hi,

I used the following code to display a floating shopping bag icon when someone puts something in the bag:

<div data-fixed="TRUE" data-fixed-position="BOTTOM_RIGHT" data-fixed-shape="PILL" data-horizontal-indent="15px" data-vertical-indent="15px" data-icon="CART" data-show-empty-cart="FALSE" data-responsive="FALSE" 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?XXXXXXXX&data_platform=code" charset="utf-8"></script><script>Ecwid.init();</script></div>

XXXXXXXX = Store-ID

I used the code before and it worked perfectly. But yesterday, I published a new website with the exact same code. It worked in development / preview website but instantly stopped working after I published the website under its own domain.

So I reached out to Ecwid support and they made litte changes to the code. Unfortunately it doesn’t work either:

<div data-layout="MEDIUM_ICON_COUNTER"
data-icon="BAG"
data-fixed="TRUE"
data-fixed-position="BOTTOM_RIGHT"
data-fixed-shape="PILL"
data-horizontal-indent="15px"
data-vertical-indent="15px"
class="ec-cart-widget"></div>
<div><script data-cfasync="false" type="text/javascript"
src="https://app.ecwid.com/script.js?XXXXXXXX&data_platform=code"
charset="utf-8"></script><script>Ecwid.init();</script></div>

XXXXXXXX = Store-ID

BTW: Has Sitejet changed anything in the system that restricts the use of custom code? I also have problems whitelisting Ecwid / to load the store without accepting cookies. See my other thread ‚Ecwid whitelisting failed‘.

Thanks for any suggestions!

edit:

just noticed that the shopping bag shows up when I whitelist ecwid with the following code:

<script>(function(w,a,i){w[a]=w[a]||[];w[a].push(i)})(window,'YETT_WHITELIST',/ecwid/)</script>

BUT the storefront isn’t visible anymore. WTF? Do I miss something?

update:

I removed the preset-cookie-consent-bar-v3 from the /shop subpage and the shopping cart showed up! So it must be related to the consent bar. @Martin can you please check with the developers what causes the issue?

@Andre @Martin

Can you please look into this issue? I’ve been in touch with ecwid and they can’t help me out. We tested different scripts but it didn’t worked when the consent bar v 3 is installed / only without. They changed nothing they said- so it must be related to the cookie consent bar v3.

Anyone else with a work-around / solution for this?

Hey there,

it seems that there was no whitelisting set up in 350980.

However, we actually did not change anything ourselves. Probably ECWID did, although they state, they did not. It seems that the keyword ecwid is not enough anymore for whitelisting. We alse nee storefront and ecomm . So the whitelisting code looks like this:

<script>(function(w,a,i){w[a]=w[a]||[];w[a].push(i)})(window,'YETT_WHITELIST',/ecwid|storefront|ecomm/)</script>

Let me know if that helped.

Hi @Andre ,

thanks for your reply.
I just check the website and functionality. Unfortunately the script isn’t working / the shop can not be displayed. Only the shopping cart is visible, but without any functionality. So I removed the script…

Eventually something else is missing in the script?!

Hey there, I will forward this to our developer to check on this. Thank you for the update!

1 Like

Are the other scripts still working?

Hi @Andre ,

The scripts are working when no cookie consent bar v3 is used.