Add to cart empty and need to re-load or re-click to have it

Topic summary

Cart add shows as empty immediately after clicking; only a refresh or re-click displays the item. Issue occurs on all products across multiple devices.

A helper suspects JavaScript isn’t updating the cart after the add-to-cart response and requested the store URL (and password if protected). The store URL was provided. The helper pointed to a possible theme.js issue: a commented line “_this36._replaceContent(html)” might prevent cart content from refreshing.

The original poster couldn’t find that line. As a temporary fix, they changed the cart type from “drawer” to “page” in theme settings, which resolved the issue.

Drawer vs page: “drawer” is a slide-out mini cart overlay; “page” redirects to the full cart page. The “drawer” cart still fails without a known cause; the “page” cart works.

Open/ongoing: Root cause of the drawer cart malfunction remains unknown. Suggested next steps: ensure the JavaScript updates cart contents after a successful add, review theme.js for any commented content-replacement logic, and perform a deeper code inspection if needed. The domain reconfiguration is noted but unconfirmed as a cause.

Summarized with AI on January 22. AI used: gpt-5.

Hi,

when I click a product to be added to cart, the cart pops up and says that it is empty. Only when I refresh the page or re-click on the product does it show that I have something in it.

Hi @daphnepungartni
I hope you are doing well.
It looks like your Javascript is not working or it may be case you are not updating cart content after successful response from cart add request.
Can you please share store and product URL where issue is occurring ?
Please provide password as well if store is password protected.
It will help me to look into the problem deeper.
Thanks!

Thank you! So I have tried it on my phone, ipad, and laptop and it is all the same! I have also tried on some friends devices as well.

I believe the Javascript would be the first place to look at. Is there a step by step on how to look more into this?

Also, we had thought our domain name was automatically purchased but it was not. So we had to re-set everything / re-pay for our name and that definitely set off some things. I wonder if this could also be a reason why ?

hi it is www.hrlawrence.com

also it is on all products!

It looks somewhat hard to debug by looking at theme code. There may be issue in your theme.js
On possible reason that my cause is this line " _this36._replaceContent(html)" is commented in theme.js, you can try removing the “//” before this line. This may solve the issue, but if it still doesn’t resolve this, then it will require deeper look into the code
Thanks!

Hi! I have been trying to find this line but cant see it anywhere!

For now I was able to fix the problem by changing our websites cart system. We had it as “drawer” and I changed it to “page” in our theme setting. This has at least fixed the problem. It would be good to know why “drawer” is not working