Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
I'm getting the following error in my Javascript console and my Buy Button is not rendering on the web page as a result:
TypeError: Cannot read properties of undefined (reading 'indexOf')
at buy-button-storefront.min.js:10:5524
This looks like an issue w/ Shopify's code, correct? Have they made breaking changes to the API in the last year? The embed code for this button is a couple of years old.
What's strange is that the Buy Button that generated this code has disappeared from my Shopify Settings, so I'll need to create a new one. How could it disappear like that?
I had a similar issue and was able to resolve it by upgrading the version of buybutton from 1.0.0 to 2.4.0
Previously: "https://sdks.shopifycdn.com/buy-button/1.0.0/buybutton.min.js"
Now: "https://sdks.shopifycdn.com/buy-button/2.4.0/buybutton.min.js"
Maybe the docs need updating because it's forever referencing the 1.0.0 build.
Hey Community! As we jump into 2025, we want to give a big shout-out to all of you wh...
By JasonH Jan 7, 2025Hey Community! As the holiday season unfolds, we want to extend heartfelt thanks to a...
By JasonH Dec 6, 2024Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024