"Add to cart" button stopped responding (Dawn theme: 2.0.0)

mnorthy
Tourist
4 0 2

Hi friends,

The "Add to cart" button on all of my Dawn-hosted product pages stopped working recently—I'm not sure exactly when the issue started, but it's certainly prevented sales at least for at least the past week.

I don't believe I installed any new plugins that could have interfered. Any thoughts on what might be causing the issue? I'm honestly not even sure where to start with diagnosing this. 

Thanks in advance for any help you might be able to offer!

Here's a link to one of my product pages where the issue is occurring: https://dklette.com/products/just-chillin-beach-towel

- Mike

Replies 10 (10)
Elias
Shopify Staff
Shopify Staff
1801 179 295

Hi, @mnorthy.

Thank you for reaching out and bringing this to our attention!

I understand that the add-to-cart button stopped working for your Dawn theme. I've taken a look at your website and I was able to replicate the problem. However, I'm unable to identify what could be causing the issue. Since you're not sure when or where the issue started as well, it looks like we’ll need to access your account in order to resolve this issue. While we’re not able to provide account-specific support via Social media at this time, we’d be happy to continue assisting you through live chat, email, or callback. Please visit the Shopify Help Center and log in to your account to create a support request.

That being said, I think the website looks amazing! Would removing the "Powered by Shopify" message from the footer be something that interests you?

Elias | 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

diego_ezfy
Shopify Partner
2749 513 695

@mnorthy 

It seems like it's missing an element with the class "product-form__error-message" and throwing up an error. Because this error is not being handled it's stopping the code and not getting to the actual "adding to cart" functionality.

Maybe you removed this element from one of your files. 

mnorthy
Tourist
4 0 2

Hi @Elias, thanks for following up here! I followed your links and opened up a support ticket with the technical team. They were able to help me out. We're back up and running now. It looks like one of the apps that was installed on our site removed a critical line of code in one of our files.

Good learning for myself and anyone else who comes across this post in the future: make a clone of your (working) theme before making any new customizations (even app/plugin installs) that you can revert to in case something doesn't work out.

Thanks again for monitoring this forum, I really appreciate the help and follow-up!

mnorthy
Tourist
4 0 2

Hey @diego_ezfy, thanks for contributing to the conversation! It seems one of the apps we installed customized the code in our product-form.js files to the point where the JavaScript wasn't executing properly on click. 

The Shopify technical support team was able to help me diagnose and resolve the issue. Thanks again for chiming in on these forums—it's super helpful.

mnorthy
Tourist
4 0 2

Note: this issue has been resolved! 🙂

dmwwebartisan
Shopify Partner
10710 2339 3325

@mnorthy 

find the following code in your assets/global.js  file 

1] find follwing function   "function fetchConfig(type = 'json') " under the function find following code 

headers: { 'Content-Type': 'application/json', 'Accept': 'application/${type}' }

Replace to 

headers: { 'Content-Type': 'application/json', 'Accept': `application/${type}` }

Hope this work.

Thanks!

If helpful then please Like and Accept Solution | Email: dmw.webartisan@gmail.com | Instagram: @dmw.webartisan
Check here PageFly App to customize your pages | Bag is a cart drawer that maximizes your sales. View app →
junabug1
New Member
1 0 0

I am currently having the same issue... what was done to fix this?

Elias
Shopify Staff
Shopify Staff
1801 179 295

Hey, @junabug1.

 

Thank you for joining the thread!

 

I understand you're having the same issue, where the add-to-cart button stopped responding. If the solutions from this thread isn't able to help and the issue continues to persist, then I'd recommend reaching out to our Support team. As previously stated, we aren't able to provide account-specific support via the Shopify Community. However, our Support team can help you loop in our Theme Support and take a closer look at your account. To get in touch with our Support team, please visit the Shopify Help Center and we'd be happy to further assist you through live chat, email, or callback. 

 

Just to confirm, did you make any changes to the theme's coding? Or, does the issue persist on a clean install of the Dawn theme?

Elias | 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

boutiquebashnz
New Member
1 0 0

ME TOO 😞 ugh this is frustrating

Elias
Shopify Staff
Shopify Staff
1801 179 295

Hey, @boutiquebashnz.

 

Thank you for joining the thread!

 

If you're experiencing the same issue, then it's possible that the issue is caused by an app or some custom coding. Just to confirm, did you install any new apps or custom coding recently?

 

If the suggestions from this thread isn't able to help you resolve the issue and you're not sure what could be causing this problem, then it looks like we’ll need to access your account in order to resolve this issue. While we’re not able to provide account-specific support via the Shopify Community at this time, we’d be happy to continue assisting you through live chat, email, or callback. Please visit the Shopify Help Center and log in to your account to create a support request.

 

I'd love to know if our Support team can help you identify and resolve this issue. Keep me posted!

Elias | 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