Why does my buy button require two clicks?

Hi. On our webshop; www.bearlifestyle.nl you need to press the buy button twice since a while.

I dont know why this is happening, also deleting your item from the pop up shopping cart gives a white screen sometimes.

Unfortunately our site developer is nog very cooperative so if somebody knows a quick fick it will be much appreciated :slightly_smiling_face:

For me its not working, sometimes i even get this message and after a while and few clicks it works again.. Very strange

Double-tap is because of the Kaktus App – do not know which one it is, but preventing Apps JS from loading in my browser fixes the double-tap problem.

As for the empty cart drawer – I can’t be 100% sure but i’d change the following in your assets/theme.js (some code is replaced with … for brevity)

from

async _changeLineItemQuantity(lineKey, targetQuantity) {
...
      const cartContent = await (await fetch(`${Shopify.routes.root}cart/change.js`, {
...
        body: JSON.stringify({
          id: lineKey,
          quantity: targetQuantity,
          sections: ["cart-drawer"]
        })

to

async _changeLineItemQuantity(lineKey, targetQuantity) {
...
      const cartContent = await (await fetch(`${Shopify.routes.root}cart/change.js`, {
...
        body: JSON.stringify({
          id: lineKey,
          quantity: targetQuantity,
          sections: [extractSectionId(this)]
        })

Basically it’s the sections: line which I see as line 2002 in your theme.js

1 Like

This fixed both the problems, thanks!!!

1 Like

Is there a way I can search in theme.js for that specific code? I have the same issue with the double click on the “add to basket”

Our Webshop; www.gooshpads.dk seems to have the same problem unfortunately, and I cant find any videoes explaining why.

Kind regards

You have an element created by this app https://apps.shopify.com/assortion which covers the cart button and is removed upon first click: