Back to Blog
Shopify Fix Guide

Shopify Add to Cart Not Working? 8 Causes and Fixes

September 30, 20267 min read

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

1

The variant is out of stock (button says "Sold out")

Check first
Open the product in your admin and check inventory for every variant. If a variant shows 0 and "Continue selling when out of stock" is off, Shopify disables the button for that variant. This often looks like a bug when only one size or color is out of stock and that option is selected by default.
2

The product isn't available on the Online Store channel or in the customer's market

A product can be Active but still not purchasable on your storefront. On the product page in your admin, check Sales channels (Online Store must be included) and Markets. If you sell internationally, a product excluded from a market can't be added to cart by customers in that country, while it works fine for you.
3

A theme update or code edit broke the product form

Most common
Add to cart is a form in your theme (product-form in Dawn-based themes) that posts the selected variant ID to Shopify's cart. Edits to the product template, a custom variant picker, or a theme update that overwrote custom code can break it silently. To test: duplicate your theme, preview the latest unedited version of your theme or Dawn, and try adding to cart. If it works there, the problem is your live theme's code.
4

An app is conflicting with the product form

Upsell, bundle, subscription, product options, cart drawer, and currency apps all hook into the add to cart button. When two of them clash, or one updates, the button can stop responding. In the theme editor, open App embeds and switch them off one at a time, testing after each. Also check for leftover code from apps you uninstalled. Uninstalling doesn't always clean up theme files.
5

Something is covering the button on mobile

Cookie banners, chat bubbles, email popups, and sticky announcement bars can overlap the add to cart button on small screens. Taps hit the overlay, so the button looks fine but never responds. In our scan of 10 Shopify stores doing $1M+ in revenue, 7 out of 10 had broken content on at least one device, and one had a cookie banner blocking the entire cart. You won't see this on your laptop.
6

The cart drawer is broken, not the cart

If the button spins or "works" but nothing appears, type yourstore.com/cart into the browser. If the product is in the cart there, adding worked and only the slide-out cart drawer is failing to open or refresh. That's a theme or cart-drawer-app script issue. Customers think it failed and tap again, ending up with duplicates.
7

A JavaScript error elsewhere on the page stops the button

On most themes, add to cart runs through JavaScript. One error from a tracking script, review widget, or custom snippet can stop every script after it, including the one that powers the button. Open the page in Chrome, right-click → Inspect → Console, then tap add to cart. Red errors point to the culprit, and the file name usually tells you which app or snippet.
8

Your theme is too far behind

Themes that haven't been updated in years can fall out of step with changes to Shopify's cart and markets features. If you're on a heavily outdated theme version, updating (on a duplicate first) often fixes cart behavior that no setting change will.

A 5-minute test to find the cause

1

Try it in a private window on your phone

Logged out, no cache, on a real device. This is how customers see your store.
2

Check /cart directly

If the item is there, it's the cart drawer. If not, adding really failed.
3

Check the variant in your admin

Inventory, sales channels, and markets for the exact variant that fails.
4

Turn off app embeds

Disable them all, test, then re-enable one at a time until it breaks again.
5

Preview a clean theme

If add to cart works on an unedited theme, the fix is in your live theme's code.

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.

Catch it automatically: BugSense loads your product and cart pages at mobile, tablet, and desktop sizes and flags JavaScript errors, failed requests, and buttons that are covered or broken, so you hear about it before your customers do. Run a free scan. No account needed.

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.

Check your add to cart on every device

Scan your product and cart pages free, no account needed →