My add to cart button is currently broken- I opened the console and this is the error I am getting:
Uncaught ReferenceError: validate_options is not defined
at HTMLButtonElement. (theme.min.js?v=129407734115698517421647378115:1:507530)
at HTMLButtonElement.dispatch (theme.min.js?v=129407734115698517421647378115:1:157302)
at v.handle (theme.min.js?v=129407734115698517421647378115:1:155297)
(anonymous) [email removed] theme.min.js?v=129407734115698517421647378115:1
dispatch [email removed] theme.min.js?v=129407734115698517421647378115:1
v.handle [email removed] theme.min.js?v=129407734115698517421647378115:1
I don’t know when exactly this stopped working or what broke it, please help!
Share your store URL please
Hi, @sarahhealey .
Thanks for reaching out and sharing your question in the community.
For better visibility, could you share your store URL so we can take a closer look at the error message you’re receiving?
Could you also provide a bit more context on the following:
- A timeline of when the issue first occurred
- What theme you’re using
- Have you made any recent changes to your theme
- Have you recently installed any new apps
Looking forward to your response!
Hi All,
I was able to revert whatever changes caused this issue and I have narrowed
it down to 2 apps that were the probable culprit.
Thank you,
Sarah
Thanks for letting us know, @sarahhealey .
We’re happy to hear you were able to resolve the issue. If you have any further questions feel free to thread them here!
I’d also love to hear what kind of online business you have and what you’re currently working on?
Hi Victoria,
Sadly this issue reoccured after reverting to a previous version of our theme, so it was obviously not the apps that I thought it was.
Our store is www.luxezen.com
Here is the error in the dev tools:
theme.min.js?v=51929576033231942791659684874:9 Uncaught ReferenceError: validate_options is not defined
at HTMLButtonElement. (theme.min.js?v=51929576033231942791659684874:9:507546)
at HTMLButtonElement.dispatch (theme.min.js?v=51929576033231942791659684874:9:157302)
at v.handle (theme.min.js?v=51929576033231942791659684874:9:155297)
(anonymous) @ theme.min.js?v=51929576033231942791659684874:9
dispatch @ theme.min.js?v=51929576033231942791659684874:9
v.handle @ theme.min.js?v=51929576033231942791659684874:9
I don’t know exactly when this stopped working nor what made it stop working.
I have compared the code for the product template pages and the theme page between now and a previous version where the add to cart button is working to try to find what is different and I cannot find it.
Thank you for your reply, @sarahhealey .
You mentioned that you’ve compared the code in the product and theme template and tried reverting to a previous theme.
Since the issue has resurfaced, I recommend reaching out to our support team via the Shopify Help Center or hiring a Shopify Expert. You’ll need to be authenticated so our team can take a look to see what additional factors are affecting your cart button. Our team may be able to provide feedback on a workaround or may suggest a Shopify Expert as it looks like the issue is code related.