Solved

Add to cart button not working

Daniel19901
Shopify Partner
70 0 10

Hi, 

 

I made this shop for a customer not a long while ago, but now (maybe related to the apps he added) the add to cart button on the homepage is not working.

Can anyone help ? 

https://odamor.co.il/

 

Thank you in advance!

Accepted Solution (1)

ThePrimeWeb
Shopify Partner
1146 298 224

This is an accepted solution.

Hey @Daniel19901,

 

The issue is regarding the missing spinner in the homepage. I can't figure out why because I don't have the backend, but I can give you a quick fix that should work theoretically. 

 

Go to your theme's "Edit Code" option and look for "product-form.js"

 

ThePrimeWeb_0-1706527809233.png

 

Then look for the following that says

"this.querySelector('.loading__spinner').classList.remove('hidden');

Mine is line 27, but your's could be different.

ThePrimeWeb_2-1706527907275.png

 

Then replace that line with the following

 

try {
  this.querySelector('.loading__spinner').classList.remove('hidden');
} catch(err) {
  console.log('loading spinner unavailable.')
}
Was I helpful?

Buy me a coffee

🙂

Need help with your store? contact@theprimeweb.com

View solution in original post

Replies 2 (2)

ThePrimeWeb
Shopify Partner
1146 298 224

This is an accepted solution.

Hey @Daniel19901,

 

The issue is regarding the missing spinner in the homepage. I can't figure out why because I don't have the backend, but I can give you a quick fix that should work theoretically. 

 

Go to your theme's "Edit Code" option and look for "product-form.js"

 

ThePrimeWeb_0-1706527809233.png

 

Then look for the following that says

"this.querySelector('.loading__spinner').classList.remove('hidden');

Mine is line 27, but your's could be different.

ThePrimeWeb_2-1706527907275.png

 

Then replace that line with the following

 

try {
  this.querySelector('.loading__spinner').classList.remove('hidden');
} catch(err) {
  console.log('loading spinner unavailable.')
}
Was I helpful?

Buy me a coffee

🙂

Need help with your store? contact@theprimeweb.com
Daniel19901
Shopify Partner
70 0 10

@ThePrimeWeb thank you SOO MUCH!!