The information in this thread might be outdated
If the solution did not help, please, check our Help Portal or contact Ecwid Team.
 
 
Thread Tools Display Modes
  #1  
Old 08-22-2017, 06:29 AM
Archiballz's Avatar
Archiballz is offline
 
Join Date: Mar 2017
Posts: 7
Default

Store not auto loading on Squarespace


My store was working fine on Squarespace but recently it stopped loading when it's navigated to. If I refresh, the store loads but many customers may simply think there's no store when they go to that section. Additionally, if I type the full store address, the page loads fine.

Here's the link to the Squarespace storefront: https://www.noircoffeelab.com/offerings/

Last edited by Archiballz; 08-22-2017 at 08:21 AM.
  #2  
Old 08-23-2017, 09:07 AM
Daria Sh.'s Avatar
Daria Sh. Daria Sh. is offline
Ecwid Team
 
Join Date: Feb 2015
Posts: 767
Default

Quote:
Originally Posted by Archiballz View Post
My store was working fine on Squarespace but recently it stopped loading when it's navigated to. If I refresh, the store loads but many customers may simply think there's no store when they go to that section. Additionally, if I type the full store address, the page loads fine.

Here's the link to the Squarespace storefront: https://www.noircoffeelab.com/offerings/
Hi,

It’s Daria from Ecwid Customer Care team.

I'm sorry that you faced this issue! It's caused by the Squarespace theme you are using. It interferes with the Ecwid script and doesn't allow it to load correctly. The Squarespace team has confirmed that such issue can occur with certain themes. This is not related to Ecwid; the problem concerns all external scripts added to the website page with this theme.

Our engineers have developed a solution to fix this issue. Perform these steps:

1) Delete the following code from Squarespace Dashboard > Settings > Advanced > Code Injection > Header.

Code:
<script>
var loadEcwid = function() {
window.ecwid_script_defer = true;
var script = document.createElement('script');
script.charset = 'utf-8';
script.type = 'text/javascript';
script.src = 'https://app.ecwid.com/script.js?11869219';
document.getElementById('my-store-11869219').appendChild(script);
window._xnext_initialization_scripts = [
{ widgetType: 'ProductBrowser', id: 'productBrowser', arg: [
'"categoriesPerRow=3","views=grid(4,4) list(10) table(20)","categoryView=grid","searchView=list","style=","responsive=yes","id=productBrowser"'
] }
];
};
if(document.readyState === "complete") {
loadEcwid();
} else {
window.addEventListener("load", loadEcwid, false);
}
 </script>
2) Add the following code to Squarespace Dashboard > Settings > Advanced > Code Injection > Footer.

Code:
<script>
  document.addEventListener("pageChange", function() {
      loadEcwid();
  }, false);
  loadEcwid();

  function loadEcwid() {
    var isEcwidPage = document.getElementById('productBrowser') != null;
    if (window.ecwidLoaded && isEcwidPage) return;
    if (!isEcwidPage) {
      if (typeof Ecwid != 'undefined') {
        Ecwid.destroy();
        removeElementsByClassName("ecwid-minicart");
        removeElementsByClassName("ecwid-pswp");
      }
      window.ecwidLoaded = false;
      return;
    }

    window.ecwidLoaded = true;
    window.ecwid_script_defer = true;
    window.ecwid_dynamic_widgets = true;

    window._xnext_initialization_scripts = [
      { widgetType: 'ProductBrowser', id: 'productBrowser', arg: [
        '"categoriesPerRow=3","views=grid(4,4) list(10) table(20)","categoryView=grid","searchView=list","style=","responsive=yes","id=productBrowser"'
      ]}];

    if (typeof Ecwid != 'undefined') {
        ecwid_onBodyDone();
    } else {
      var script = document.createElement('script');
      script.charset = 'utf-8';
      script.type = 'text/javascript';
      script.id = 'ecwid-script'
      script.src = 'https://app.ecwid.com/script.js?11869219';
      document.getElementById('my-store-11869219').appendChild(script);
    }
  }

  function removeElementsByClassName(className) {
    var elements = document.getElementsByClassName(className);
    for (var i = 0; i < elements.length; i++) {
        elements[i].parentNode.removeChild(elements[i]);
    }
  }

  window.onload = function(){MutationObserver=window.MutationObserver||window.WebKitMutationObserver;var a=new MutationObserver(function(a){for(var b=0;b<a.length;b++){var c=a[b];if("attributes"===c.type){var d=new Event("pageChange");document.dispatchEvent(d)}}});a.observe(document.body,{attributes:!0,attributeFilter:["id"]})}
</script>
After you perform these steps, the issue should be gone.

Let me know if you need any further help with it. Thanks!
__________________
Daria
Ecwid Customer Care Team

More tips and hints on Ecwid use in our Help Center

⬇ Please click Thanks if my reply helped you.
  #3  
Old 08-23-2017, 02:22 PM
Archiballz's Avatar
Archiballz Archiballz is offline
 
Join Date: Mar 2017
Posts: 7
Default

Quote:
Originally Posted by Daria Sh. View Post
Hi,

It’s Daria from Ecwid Customer Care team.

I'm sorry that you faced this issue! It's caused by the Squarespace theme you are using. It interferes with the Ecwid script and doesn't allow it to load correctly. The Squarespace team has confirmed that such issue can occur with certain themes. This is not related to Ecwid; the problem concerns all external scripts added to the website page with this theme.

Our engineers have developed a solution to fix this issue. Perform these steps:

1) Delete the following code from Squarespace Dashboard > Settings > Advanced > Code Injection > Header.

Code:
<script>
var loadEcwid = function() {
window.ecwid_script_defer = true;
var script = document.createElement('script');
script.charset = 'utf-8';
script.type = 'text/javascript';
script.src = 'https://app.ecwid.com/script.js?11869219';
document.getElementById('my-store-11869219').appendChild(script);
window._xnext_initialization_scripts = [
{ widgetType: 'ProductBrowser', id: 'productBrowser', arg: [
'"categoriesPerRow=3","views=grid(4,4) list(10) table(20)","categoryView=grid","searchView=list","style=","responsive=yes","id=productBrowser"'
] }
];
};
if(document.readyState === "complete") {
loadEcwid();
} else {
window.addEventListener("load", loadEcwid, false);
}
 </script>
2) Add the following code to Squarespace Dashboard > Settings > Advanced > Code Injection > Footer.

Code:
<script>
  document.addEventListener("pageChange", function() {
      loadEcwid();
  }, false);
  loadEcwid();

  function loadEcwid() {
    var isEcwidPage = document.getElementById('productBrowser') != null;
    if (window.ecwidLoaded && isEcwidPage) return;
    if (!isEcwidPage) {
      if (typeof Ecwid != 'undefined') {
        Ecwid.destroy();
        removeElementsByClassName("ecwid-minicart");
        removeElementsByClassName("ecwid-pswp");
      }
      window.ecwidLoaded = false;
      return;
    }

    window.ecwidLoaded = true;
    window.ecwid_script_defer = true;
    window.ecwid_dynamic_widgets = true;

    window._xnext_initialization_scripts = [
      { widgetType: 'ProductBrowser', id: 'productBrowser', arg: [
        '"categoriesPerRow=3","views=grid(4,4) list(10) table(20)","categoryView=grid","searchView=list","style=","responsive=yes","id=productBrowser"'
      ]}];

    if (typeof Ecwid != 'undefined') {
        ecwid_onBodyDone();
    } else {
      var script = document.createElement('script');
      script.charset = 'utf-8';
      script.type = 'text/javascript';
      script.id = 'ecwid-script'
      script.src = 'https://app.ecwid.com/script.js?11869219';
      document.getElementById('my-store-11869219').appendChild(script);
    }
  }

  function removeElementsByClassName(className) {
    var elements = document.getElementsByClassName(className);
    for (var i = 0; i < elements.length; i++) {
        elements[i].parentNode.removeChild(elements[i]);
    }
  }

  window.onload = function(){MutationObserver=window.MutationObserver||window.WebKitMutationObserver;var a=new MutationObserver(function(a){for(var b=0;b<a.length;b++){var c=a[b];if("attributes"===c.type){var d=new Event("pageChange");document.dispatchEvent(d)}}});a.observe(document.body,{attributes:!0,attributeFilter:["id"]})}
</script>
After you perform these steps, the issue should be gone.

Let me know if you need any further help with it. Thanks!
Thanks, but it still didn't work.
  #4  
Old 08-24-2017, 01:07 PM
Daria Sh.'s Avatar
Daria Sh. Daria Sh. is offline
Ecwid Team
 
Join Date: Feb 2015
Posts: 767
Default

Quote:
Originally Posted by Archiballz View Post
Thanks, but it still didn't work.
Oh, sorry, my bad!

I forgot to update the script specifically for your store. Please, use these scripts accordingly:

Code:
<script>
var loadEcwid = function() {
window.ecwid_script_defer = true;
var script = document.createElement('script');
script.charset = 'utf-8';
script.type = 'text/javascript';
script.src = 'https://app.ecwid.com/script.js?10598046';
document.getElementById('my-store-10598046').appendChild(script);
window._xnext_initialization_scripts = [
{ widgetType: 'ProductBrowser', id: 'productBrowser', arg: [
'"categoriesPerRow=3","views=grid(4,4) list(10) table(20)","categoryView=grid","searchView=list","style=","responsive=yes","id=productBrowser"'
] }
];
};
if(document.readyState === "complete") {
loadEcwid();
} else {
window.addEventListener("load", loadEcwid, false);
}
 </script>
Code:
<script>
  document.addEventListener("pageChange", function() {
      loadEcwid();
  }, false);
  loadEcwid();

  function loadEcwid() {
    var isEcwidPage = document.getElementById('productBrowser') != null;
    if (window.ecwidLoaded && isEcwidPage) return;
    if (!isEcwidPage) {
      if (typeof Ecwid != 'undefined') {
        Ecwid.destroy();
        removeElementsByClassName("ecwid-minicart");
        removeElementsByClassName("ecwid-pswp");
      }
      window.ecwidLoaded = false;
      return;
    }

    window.ecwidLoaded = true;
    window.ecwid_script_defer = true;
    window.ecwid_dynamic_widgets = true;

    window._xnext_initialization_scripts = [
      { widgetType: 'ProductBrowser', id: 'productBrowser', arg: [
        '"categoriesPerRow=3","views=grid(4,4) list(10) table(20)","categoryView=grid","searchView=list","style=","responsive=yes","id=productBrowser"'
      ]}];

    if (typeof Ecwid != 'undefined') {
        ecwid_onBodyDone();
    } else {
      var script = document.createElement('script');
      script.charset = 'utf-8';
      script.type = 'text/javascript';
      script.id = 'ecwid-script'
      script.src = 'https://app.ecwid.com/script.js?10598046';
      document.getElementById('my-store-10598046').appendChild(script);
    }
  }

  function removeElementsByClassName(className) {
    var elements = document.getElementsByClassName(className);
    for (var i = 0; i < elements.length; i++) {
        elements[i].parentNode.removeChild(elements[i]);
    }
  }

  window.onload = function(){MutationObserver=window.MutationObserver||window.WebKitMutationObserver;var a=new MutationObserver(function(a){for(var b=0;b<a.length;b++){var c=a[b];if("attributes"===c.type){var d=new Event("pageChange");document.dispatchEvent(d)}}});a.observe(document.body,{attributes:!0,attributeFilter:["id"]})}
</script>
And also add this HTML to the page where your Ecwid store is added:

Code:
<div id="my-store-10598046"></div>
<div id="productBrowser"></div>
Let me know the results!
__________________
Daria
Ecwid Customer Care Team

More tips and hints on Ecwid use in our Help Center

⬇ Please click Thanks if my reply helped you.

Last edited by Wendy; 11-03-2017 at 03:22 PM.
  #5  
Old 08-24-2017, 05:18 PM
Archiballz's Avatar
Archiballz Archiballz is offline
 
Join Date: Mar 2017
Posts: 7
Default

Quote:
Originally Posted by Daria Sh. View Post
Oh, sorry, my bad!

I forgot to update the script specifically for your store. Please, use these scripts accordingly:

Let me know the results!
It works! Thanks!
  #6  
Old 03-29-2018, 09:39 PM
Daniel C.'s Avatar
Daniel C. Daniel C. is offline
Junior Member
 
Join Date: Mar 2018
Posts: 3
Default

Hi, I have a similar problem; ecwid does not load at all on my website. I've tested this code (changing the script to my store ID), but it didn't work. Could you please hel me?

This page is where I've added the code: https://www.danielconz.com/store#/t-...o-not-disturb/

Thanks,
  #7  
Old 03-30-2018, 08:55 AM
Stacy_P's Avatar
Stacy_P Stacy_P is offline
Ecwid Team
 
Join Date: Jan 2016
Posts: 308
Default

Quote:
Originally Posted by Daniel C. View Post
Hi, I have a similar problem; ecwid does not load at all on my website. I've tested this code (changing the script to my store ID), but it didn't work. Could you please help me?

This page is where I've added the code: https://www.danielconz.com/store#/t-...o-not-disturb/

Thanks,

Hello Daniel,

This is Stacy from Ecwid Customer Care team.

Thank you for your messages here on the forums.

I'm sorry that you faced this issue with your store loading on your Squarespace site. I'm here to help you rectify it.

I inspected your site https://www.danielconz.com and could not allocate an Ecwid store on it, sorry. Also, I checked our store database and I found your Ecwid account ID 6632114.

As I understand, the store did not load on your site, right?

Let me explain you the reason of such behavior and how to fix it. It's caused by the Squarespace theme you are using. It interferes with the Ecwid script and doesn't allow it to load correctly. The Squarespace team has confirmed that such issue can occur with certain themes. This is not related to Ecwid; the problem concerns all external scripts added to the website page with this theme.

Our engineers developed a solution to fix this issue. I've applied it to your Ecwid account and generated the needed scripts.

Please, perform these steps:

1 - Go to your Squarespace admin panel and delete all the scripts related to Ecwid from your site

2 - Proceed to the page where you want to show your Ecwid store and place this line to this exact place:

Code:
<div id='my-store-6632114'></div>
Please, see a screencast how to do it.

3 - Add the following code to Squarespace Dashboard > Settings > Advanced > Code Injection > Footer:

Code:
	<script>
		(function(ownerId) {
			document.addEventListener("pageChange", function() {
				loadEcwid();
			}, false);
			loadEcwid();

			function loadEcwid() {
				var container = document.getElementById('my-store-' + ownerId)
				var isEcwidPage = container != null;
				var ecwidLoaded = isEcwidPage && container.childNodes.length > 0
				if (ecwidLoaded && isEcwidPage) return;
				if (!isEcwidPage) {
					if (typeof Ecwid != 'undefined') {
						Ecwid.destroy();
						removeElementsByClassName("ecwid-minicart");
						removeElementsByClassName("ecwid-pswp");
					}
					return;
				}

				window.ecwid_script_defer = true;
				window.ecwid_dynamic_widgets = true;

				var defaultCategoryId = (!!container.dataset['defaultCategoryId']?'defaultCategoryId=' +  container.dataset['defaultCategoryId'] : '')
				window._xnext_initialization_scripts = [
					{ widgetType: 'ProductBrowser', id: 'my-store-' + ownerId, arg: [
						"categoriesPerRow=3","views=grid(4,4) list(10)	table(20)","categoryView=grid","searchView=list","style=","responsive=yes","id=my-store-' + ownerId +'",defaultCategoryId
					]}];

				if (typeof Ecwid != 'undefined') {
					ecwid_onBodyDone();
				} else {
					var script = document.createElement('script');
					script.charset = 'utf-8';
					script.type = 'text/javascript';
					script.id = 'ecwid-script'
					script.src = 'https://app.ecwid.com/script.js?' + ownerId;
					document.getElementById('my-store-' + ownerId).parentNode.appendChild(script);
				}
			}

			function removeElementsByClassName(className) {
				var elements = document.getElementsByClassName(className);
				for (var i = 0; i < elements.length; i++) {
					elements[i].parentNode.removeChild(elements[i]);
				}
			}

			// init watch function
			window.onload = watch;
			function watch(){MutationObserver=window.MutationObserver||window.WebKitMutationObserver;var a=new	MutationObserver(function(a){for(var b=0;b <a.length;b++){var c=a[b];if("attributes"===c.type){var d=new Event("pageChange");document.dispatchEvent(d)}}});a.observe(document.body,{attributes:!0,attributeFilter:["id"]})}
		})(6632114);
	</script>
That's all. I really hope this will help you. Please, do let me know if it works for you.

Thank you.
__________________
Stacy
Ecwid Customer Care Team
Help Center


⬇ Please click Thanks if my reply helped you.
  #8  
Old 06-01-2018, 01:55 PM
Chuck Morris's Avatar
Chuck Morris Chuck Morris is offline
 
Join Date: Jun 2018
Posts: 1
Default Syncing problem

I'm having the same problem on jacksonavenuetea.com

Can you take a look?
  #9  
Old 06-02-2018, 06:52 AM
Reina I.'s Avatar
Reina I. Reina I. is offline
Ecwid Team
 
Join Date: Dec 2017
Posts: 18
Default

Quote:
Originally Posted by Chuck Morris View Post
I'm having the same problem on jacksonavenuetea.com

Can you take a look?
Hello Chuck,

This is Reina from Ecwid Team. Thank you for your message!

I've checked your store (https://jacksonavenuetea.com/shop/) on the several devices (desktop and mobile), but I couldn't reproduce the problem. Your Ecwid store automatically loads each time I open the shop tab on your Squarespace site.

If you still have the problem with your store loading, can you please provide us with the additional details?
  • Your OS and browser info. Please, open the link https://www.ecwid.com/internet, and send me the information that is displayed on this page.

    Please, record a HAR file at the moment when you reproduce the problem. You can find the instruction of how to generate a HAR file in the different browsers here: https://support.cloudflare.com/hc/en...te-a-HAR-file-

    Your browser console logs. When you reproduce the problem, make a right click on the page, choose "Inspect elements". Then, go to the "Console" tab, choose "All", copy the logs to a text file and send us this file.

Please, send us these details to support@ecwid.com. They can help us to reproduce the problem and troubleshoot it. Thank you.

Look forward to your reply!
  #10  
Old 10-06-2018, 08:54 AM
vloikas's Avatar
vloikas vloikas is offline
Junior Member
 
Join Date: Oct 2018
Posts: 1
Default

My store is not loading either on my Squarespace site and I need to get it working, thank you!


https://vesaloikas.com/art-store/

My Ecwid store <div id='my-store-224348'></div>
 
The information in this thread might be outdated
If the solution did not help, please, check our Help Portal or contact Ecwid Team.

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 09:27 PM.
Powered by vBulletin® Version 3.8.11. Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.