Add to cart not working on first click

Joshoney
Visitor
2 0 1

Hello all

 

Suddenly my products "add to cart" button don't work on the first click.

Meaning, if i click add to cart, nothing happens.

When I click again (second time) it adds the item to the cart.

How do i resolve this?

My website is

www.joshoney.me 

Thank you 

Replies 9 (9)

LuckyNigam
Pathfinder
142 8 14

Hi @Joshoney ,

I'm checking your website but I don't seen any error. Means Add to cart working on first click no need to click second time. If it is happens for a specific product Please give me that product title,

Joshoney
Visitor
2 0 1

@LuckyNigam 
Are you checking on mobile?

this issue is happening on mobile only

MSO
Visitor
2 0 1

Same problem on my shop. Any results?

diego_ezfy
Shopify Partner
2935 562 883

@Joshoney @MSO 

This type of problem can happen only if:

1. You installed any apps that add code to your product page
2. You customized your theme (either yourself or a developer)

If you're still experiencing this issue I'd recommend installing a fresh copy of whichever theme you're using, just to be on the safe side.

Kind regards,
Diego 

◦ Follow my blog & youtube for coding tutorials. Most questions in here are already answered there!
◦ Top #4 Shopify Expert, 24h reply. Click here to hire me.
Download copy/paste code snippets that can replace most apps.

Oscar6
New Member
5 0 0

Exactly the same problem! 

Have you guys solved it? What was it?

MSO
Visitor
2 0 1

i solved it. The Problem was the cookie notice banner. Switched to another cookie solution and now it works fine.

Took me days to figure this out.

Hope this helps

Oscar6
New Member
5 0 0

Thank you for your reply! Highly appreciate it 😉

All the best for you in business.

diego_ezfy
Shopify Partner
2935 562 883

Happy to hear everyone's managed to get this issue solved.

For anyone getting through this thread in the future, please keep notice of the following:

Obviously add to cart buttons are an absolutely essential part of an e-com website, therefore developers will never ship a theme without testing in every single possible way that an add to cart button works properly.

If your ATC button is not working, there are only two possible reasons:

1. Faulty custom code;
2. An app.

There is nothing else that can harm your ATC besides the two above.

Before finding out what the reason is, download and install a fresh copy of whichever theme you are using until you find out what is going on.

You'll have to redo the styles, copy and so on, but it's better to put that amount of work and ensure your website is working than having a completely useless e-com website.

Kind regards,
Diego

◦ Follow my blog & youtube for coding tutorials. Most questions in here are already answered there!
◦ Top #4 Shopify Expert, 24h reply. Click here to hire me.
Download copy/paste code snippets that can replace most apps.

Meberem
Visitor
1 0 0

I'm glad that everyone here managed to solve their issue. Sadly for me, removing the cookie banner did not work. After a little bit of digging we found this issue was affecting primarily iOS users and the users "click" was acting like a hover instead. Apparently iOS does some funky things when buttons have a hover property and this was the cause of our ignored clicks.

 

Changing our global.js to add:

if (!("ontouchstart" in document.documentElement)) {
    document.documentElement.className += " no-touch";
}

and our css to be more like

.no-touch .button:hover {
   // Hover styles here
}


Fixed our issues. I just wanted to leave this here in case anyone else come across this and find this useful