Shopify Add to Cart Not Working? 8 Causes and Fixes
If your Shopify add to cart button isn't working, first look at how it fails. A button that says "Sold out" or is greyed out is a product setting. A button that does nothing when tapped is a code problem, usually a theme update, an app conflict, or an overlay covering it on mobile. A button that works but the cart looks empty is usually the cart drawer, not the cart. This guide walks through each case and the fix.
Quick answer: match the symptom
- Shows "Sold out" or "Unavailable": inventory is 0 with "Continue selling when out of stock" off, or the variant doesn't exist.
- Tapping does nothing: a JavaScript error from your theme or an app, or something invisible covering the button on mobile.
- Item "adds" but the cart drawer doesn't open: go to /cart. If the item is there, the drawer script is broken, not the cart.
- Only on phones: a cookie banner, chat widget, or popup is intercepting taps.
The 8 causes and how to fix each
The variant is out of stock (button says "Sold out")
Check firstThe product isn't available on the Online Store channel or in the customer's market
A theme update or code edit broke the product form
Most commonAn app is conflicting with the product form
Something is covering the button on mobile
The cart drawer is broken, not the cart
A JavaScript error elsewhere on the page stops the button
Your theme is too far behind
A 5-minute test to find the cause
Try it in a private window on your phone
Check /cart directly
Check the variant in your admin
Turn off app embeds
Preview a clean theme
How to add a product to the Shopify cart automatically
Shopify supports cart permalinks: a link in the format yourstore.com/cart/VARIANT_ID:QUANTITY sends customers straight to checkout with that product. It's useful in emails, ads, and social posts, and it's a quick way to test whether your store can sell a product at all, independent of your theme's add to cart button. For free gifts or automatic add-ons, use an app or Shopify Functions rather than theme code.
Stop losing sales to a broken button
An add to cart button that fails on mobile is one of the most expensive bugs a store can have. Traffic keeps coming and nobody buys, and nothing in your admin tells you why. Test your best-selling product on your phone after every theme update and app install.
Frequently asked questions
Why isn't the add to cart button working in Shopify?
If the button says Sold out, the selected variant has no inventory and overselling is off. If it does nothing when tapped, a JavaScript error from your theme or an app is stopping it, or an overlay such as a cookie banner or chat widget is covering it on mobile. Test with app embeds disabled and on an unedited copy of your theme.
Why can't customers add an item to their cart?
Check that the product is Active, available on the Online Store sales channel and in the customer's market, and that the chosen variant has inventory. If those are fine, the problem is in the theme or an app, which you can isolate by disabling app embeds and previewing a clean theme.
Is Shopify having issues right now?
Check shopifystatus.com for live incidents. If Shopify shows no incident and the problem is only on your store, the cause is your product settings, theme, or apps.
Why does add to cart work on desktop but not mobile?
Usually because something covers the button on small screens, like a cookie banner, chat widget, popup or sticky bar, or because a mobile-only cart drawer script is failing. Test on a real phone rather than a resized desktop browser.
How can I automatically add a product to my Shopify cart?
Use a cart permalink in the format yourstore.com/cart/VARIANT_ID:QUANTITY, which sends the customer to checkout with that product. For automatic free gifts or add-ons, use an app or Shopify Functions.