Cart drawer empty after clicking "Add to cart"

Cart drawer empty after clicking "Add to cart"

jbrandtQ5
Tourist
4 0 1

My store is fedequipplus.com and uses the Athens theme (version 2.6, the latest). 

 

When visiting for the first time, when you click "Add To Cart" the cart drawer opens but there are no items in it, and the cart bug number doesn't get added. 

shopify1.png

If you click "Add To Cart" again you are advised that you can't add another to the cart - which is expected behavior, as our inventory only has 1 of each item. This means the item is already in your cart. 

 

If you refresh the page, the cart number bug appears and the cart has the item.

shopify2.png

 

This is happening consistently on every product when using an InPrivate window in Edge, and an Incognito Mode window in Chrome. This leads me to believe it only happens for new users. I have not even tried this in Mobile view.

 

Once you've refreshed and have items in your cart, the cart works as normal. 

 

There are no Javascript errors. The only app we're using is the Online Chat app, which I have turned off and tested and the issue still happens. 

 

I've seen other similar questions to mine with no resolution. I am hoping there is a resolution here. 

 

Similar threads:

Problem with mobile 

Currency related solution that didn't work for me 

Same problem, no resolution

Another same problem, no resolution

This issue was the same as mine but somehow a network problem on Shopify's end

Replies 2 (2)

PaulNewton
Shopify Partner
7746 679 1614

Hi @jbrandtQ5 👋 I suspect it's cart cookies as this appears to happen when a site cookie isn't set or is cleared.

This could probably be fixed by calling a cart endpoint early.

Reproduction steps:

  1. Visit product in browser with clean cache, no cookies, or private browsing mode
  2. open cart page in separate window/tab
  3. in product page add product > empty cart drawer opens
  4. in cart page window/tab refresh that page then remove the item, or use /cart/clear endpoint
  5. in product page window/tab do not refresh page just add item to cart > cart drawer with item appears.
  6. rinse repeat to confirm issue reproduction then:
    1. in cart page window/tab refresh that page then remove the item, or use /cart/clear endpoint
    2. clear site cookies || or delete specific cart cookies ("cart", "cart_sig")
    3. in product page add product > empty cart drawer opens

 

Also rule out apps and code customizations.

  • If there are any apps that interact with the theme disable them from interacting with themes being tested.
  • Install a new version of the theme and retest.
  • If theme has been customized try try an older unmodified version to rule out customizations.

 

If even a NEW theme install of a theme has an issue also kick this up to the themes developers.


If you need debugging or theme repair services then contact me.
Contact info in forum signature.
ALWAYS please provide context, examples: store url, theme name, post url(s) , or any further detail in ALL correspondence.

 

Good Hunting.

Contact paull.newton+shopifyforum@gmail.com for the solutions you need


Save time & money ,Ask Questions The Smart Way


Problem Solved? ✔Accept and Like solutions to help future merchants

Answers powered by coffee Thank Paul with a Coffee for more answers or donate to eff.org


jbrandtQ5
Tourist
4 0 1

Thank you very much for talking a look at my problem, Paul. 

 

I went to troubleshoot yesterday and could not re-create the issue. Someone else tested today and also couldn't re-create.

 

I'm now thinking that it was somehow a network problem, or something else on Shopify's end, as brought up in the last thread I linked to in my post. Someone else posted on this forum yesterday that they had the same issue with "Add to Cart," only they seem to have fixed it by reinstalling an app. It's possible their timing coincided with whatever issues Shopify was having.