-
Notifications
You must be signed in to change notification settings - Fork 116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeError when using buybutton js #838
Comments
Hey, I'm seeing this same behavior. Anybody find a solution? I'm running the 2.2.1 version, found it initially with 2.1.8. |
Updating to 2.2.1 fixed the problem for me. |
Having this issue as well with 2.2.1 (originally had the error with 2.1.8) |
i would echo Brian's comment. I didn't have the reference to 2.2.1 corrected initially. Now it seems to work ok for me. |
I'm having this issue again. Updating to 2.4.0 seems to fix that error, but the {{data.selectedVariant.price}} no longer works and is just outputting [object object] can anyone help me to resolve. This is time sensitive. |
@brianrivet-tilt https://shopify.dev/docs/api/storefront/2023-07/objects/MoneyV2 |
@murphy1484 |
@philosophy-flow I've added following code to format the price to the product options in the
then in the templates attribute you can use it.
|
Hi @brianrivet-tilt |
Nevermind, I fixed it by adding the script in my HTML file https://sdks.shopifycdn.com/buy-button/2.4.0/buybutton.js instead of the https://sdks.shopifycdn.com/buy-button/1.0.0/buybutton.js |
I'm getting the following error when trying to use the buy button:
TypeError: Cannot read properties of undefined (reading 'indexOf')
at buybutton.js:12613:25
Here's and example of my code (I have a number of products and they are all doing this):
`
var shopui = ShopifyBuy.UI.init(client);
`
The text was updated successfully, but these errors were encountered: