Why does my add to cart button keep loading?

Topic summary

A user is experiencing an intermittent issue where the “add to cart” button gets stuck loading after the first successful addition.

Problem Pattern:

  • First product addition works correctly
  • Subsequent attempts to add the same product immediately after result in endless loading
  • Switching to a different product allows one successful addition, but repeating the action causes the same loading issue
  • Occurs on both mobile and desktop across multiple themes and variations

Technical Analysis:
A developer (Ihor-Sh) identified this as a complex issue requiring review of the theme’s core empire.js code. After the first add_to_cart request, subsequent AJAX requests fail, preventing customers from adding the same product again unless cookies are cleared.

Current Status:
The developer offered to investigate and resolve the issue by connecting to the store directly. The conversation moved to private channels to continue troubleshooting.

Summarized with AI on November 11. AI used: claude-sonnet-4-5-20250929.

Hi im having an issue with my products just loading when adding to cart.
It so happens that the first time i add something to cart it works perfectly - and if i just click add to cart again directly after it just loads - and if i change product, and try to add to cart it will add them to cart, but if i add again directly after it gets stuck on loading again. - this is an issue on both mobile, and dekstop - and i’ve tried on many live theme and previous variations - and it seem to do it on everything - i just dont remember it being an issue before now.

www.miniservietten.dk

Hi, Yes that makes sense - but how do i find out what part of the code could cause this issue - im not really much of a coder - so i dont even know where to start.

Hi @miniserv it’s a bit complex issue.
To fix it theme core empire.js code review needed on dev environment.
Somehow after first add_to_cart request next ajax request fails and didn’t give ability to customer to add same product to cart again (only cookie cleanup helps). issue looks very weird and urgent i think.
I can resolve this, but i will need to connect to your store. If you’re interested in this - feel free to continue discussion in private channel.

Hi Ihor - sounds interesting, id love your help - ive sent you a private message