Add to Cart Not Working

Solved
Highlighted
Excursionist
20 0 3

Hey Guys, 

I am using Booster Theme and suddenly my add to cart button has stopped working on mobile devices . It works fine on desktop.I am unable to figure out what went wrong .Can someone please help me .

 

My store-  spicystore.in

 

Thanks in advance

0 Likes
Highlighted
Excursionist
20 0 3

Please helpme

 

0 Likes
Highlighted
Astronaut
1085 178 213

1. In your Shopify Admin go to online store > themes > actions > edit code
2. In your theme.liquid file, find the </body> (press CTRL + F or command + F on Mac)
3. paste this code right above the </body> tag:

 

 

<script> 
document.addEventListener("DOMContentLoaded", function() {
          var a = document.querySelector(`.grid__item > #AddToCart.dynamic_paybtn`);
var fakeATC = document.querySelector(`#mst-stiky-box button`);

if (!fakeATC || !a)return;
fakeATC.addEventListener('click', function(){
a.click();
});
            });
</script>

 

 

 

 

◦ Problem Solved? ✔️ Please click on Accept as Solution and like.
◦ Hire me! Recommended by 25+ customers on Facebook. Click here to read their reviews.
◦ Contact me at: diego.boarutto.fortes@gmail.com
1 Like
Highlighted
Excursionist
20 0 3

Thank you for the response and your code. I tried editing the code as you instructed me to but I am still not able to ADD To Cart. I am attaching screenshot of the code so you can verify if I did it right.

I am also attaching the error it shows when I try to add something to my cart.

 

Screenshot 2020-08-08 at 10.58.06 PM.png

 

 

Screenshot 2020-08-09 at 12.43.56 AM.png

0 Likes
Highlighted
Astronaut
1085 178 213

This is an accepted solution.

Remove <script> from the line 252 and it should work

◦ Problem Solved? ✔️ Please click on Accept as Solution and like.
◦ Hire me! Recommended by 25+ customers on Facebook. Click here to read their reviews.
◦ Contact me at: diego.boarutto.fortes@gmail.com
1 Like
Highlighted
Excursionist
20 0 3

Hello,

Thanks a lot for your valuable suggestion and help.You are a real gem my friend.  The add to cart button is working fine now however  the dynamic  "Buy Now" button still shows the same error but I think  I can manage without it unless I find a solution.

Thanks a lot.

 

Screenshot 2020-08-09 at 6.57.51 PM.png

0 Likes