Why are my product images not loading consistently on my site?

Why are my product images not loading consistently on my site?

FishersPopcorn
Visitor
2 0 0

Hello, I'm having an issue that I'm hoping someone can help me with.  Our site is www.fishers-popcorn.com.  On product pages and collection pages, product photos won't load consistently.  Typically they won't load on the first instance of a page, but if you refresh the page, they'll load then.  An example page is here: https://www.fishers-popcorn.com/collections/tubs-by-size

 

I've opened a developer console in the browser and when the images don't load, I see the following error.

 
[Error] TypeError: window.cart.init is not a function. (In 'window.cart.init()', 'window.cart.init' is undefined)
(anonymous function) (jquery.min.js:2:31126)
 
I'm not fluent in javascript so can only guess what's going on here.  I suspected it might be some conflicting app, but haven't been able to determine which app it might be.  I've searched the forum and have found some similar instances that were corrected by shifting the position of some javascript calls in the theme.liquid file, but those changes had already been made in the original theme file.  For reference, we are using the Turbo theme by Out of The Sandbox.
 
Any insight would be greatly appreciated.  Thanks!
 
Replies 3 (3)

Olivia
Shopify Staff (Retired)
1725 148 321

Hi, @FishersPopcorn!

 

Welcome to Shopify Community.

 

Thank you so much for sharing your question with our network. I was happy to take another look at your site, though I wasn't able to replicate the experience you described of having to double load or refresh the page in order to see product images appear.

 

For reference, I tested the link you shared with me through various browsers and network connections along with some co-workers. That makes me wonder then if what you are experiencing is localized to your network or device?

 

Have you tried ruling out local errors for good measure:

 

  • Try clearing cache/cookies of current browser
  • Try from a different, up-to-date, browser
  • Try from a different network connection

I'd love to make sure that we can indeed find a widespread issue first so you can find the right solution for your needs.

 

I look forward to your reply,

Olivia | Social Care @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit the Shopify Help Center or the Shopify Blog

FishersPopcorn
Visitor
2 0 0

The problem occurs primarily in Safari.  It doesn't occur in Chrome.  The folks at my marketing agency have replicated it on their end as well.  I just tried again in the most up to date version of Safari and am still experiencing it.  I have localized it to be related to the error message I listed in my original post.  If I refresh with the developer console open, when the images load properly, the error doesn't show, but if they don't load, the error shows up.  When it happens on the product page, it also doesn't load the product form either so people can't add the item to their cart.

Olivia
Shopify Staff (Retired)
1725 148 321

Thank you so much for that added context, @FishersPopcorn.

 

Is there any chance you share the same ISP (Internet Service Provider) in the same region? That can sometimes be a factor in seeing localized errors to help further diagnose what may be the problem.

 

Regardless, I invite you to check out this tutorial on diagnosing Theme Issues and how to resolve app and code related occurrences.

 

I do hope that can shed further light, but in the meantime I also invite the rest of our community members to offer their troubleshooting steps as well as testing your site.


Warm regards,

Olivia | Social Care @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit the Shopify Help Center or the Shopify Blog