// Troubleshooting · Storefront

Why is my add-to-cart button not working on Shopify?

By Navaal AIPublished 27 August 20268 min read

A Shopify add-to-cart button that does nothing is almost always one of five things: a JavaScript error (usually from a newly installed app or a theme edit) stopping the click; a variant that isn't selected or is out of stock; an app conflict injecting broken scripts; a theme update that changed the product-form markup; or a cart/AJAX setting that fails silently. Open your browser console (F12) on the product page, look for a red error, and test in an incognito window on both mobile and desktop. That narrows it down fast — the hard part is knowing it's broken before customers do.

A broken add-to-cart button is the most expensive bug a store can have: the customer is ready to buy, clicks, and nothing happens. There's no error message, no second chance — they leave. Worse, it often breaks quietly, for a subset of products or on one device, so it can run for days before anyone notices. Here's how to find the cause and fix it, in the order most likely to be the culprit.

First: confirm it's actually broken, and for whom

Before you change anything, reproduce it cleanly:

  • Use an incognito/private window. This rules out your admin login, cached scripts, and browser extensions.
  • Test your live theme, not a preview. Preview URLs can behave differently from what customers see.
  • Check mobile and desktop. A button that works on desktop can fail on mobile if a sticky bar or app overlaps it.
  • Try several products. If it fails on some and not others, the pattern (a variant, a tag, a collection) is a strong clue.

Cause 1: a JavaScript error is stopping the click

This is the single most common cause. The button relies on JavaScript to add the item and update the cart; if any script on the page throws an error first, the handler may never run. Open your browser's developer console (F12 → Console) and reload the product page. A red error — especially one naming a .js file from an app or your theme — usually points straight at the problem. Note the file: if it's an app's script, that app is your prime suspect.

Cause 2: a variant isn't selected, or is out of stock

Many themes disable the add-to-cart button until a required option (size, colour) is chosen, and keep it disabled for sold-out variants. This is correct behaviour — but it looks like a bug if the default variant loads as out of stock, or if the option selector is hard to see. Check whether the button is truly dead or just disabled (greyed out) pending a selection. If in-stock, fully-selected variants still won't add, move on.

Cause 3: an app conflict

Apps that inject JavaScript — upsells, sticky carts, product-options builders, reviews, currency switchers — are a frequent cause. Two apps can conflict, or one can conflict with your theme, and the cart breaks. To isolate it:

  1. List apps you installed or updated just before the problem started.
  2. Disable them one at a time (or pause their script embeds under Online Store → Themes → Customize → App embeds).
  3. Re-test the button after each change.

When the button comes back, you've found it. Contact that app's support with the console error — it's usually a known conflict.

Cause 4: a theme update or customization changed the form

If the button broke right after a theme update, a manual edit, or a "buy button" change, the product form's markup or its JavaScript hooks may have changed. Compare against a fresh copy of your theme, or restore the last known-good theme version (Shopify keeps a history under Themes → ⋯ → older versions). If you edited product-form.liquid or a cart snippet, that's where to look.

Cause 5: cart / AJAX settings failing silently

Some themes add to cart via AJAX (without a page reload) and show a drawer or notification. If that request fails — a bad cart endpoint, a blocked request, a third-party script hijacking the form — the button appears to do nothing. The console's Network tab will show a failed /cart/add request if this is the cause.

The hard part isn't fixing it — it's catching it. A broken add-to-cart usually breaks quietly, on one device or one variant, and runs until a customer complains. Bilby is an AI that walks your store in a real browser like a first-time customer — home, product, add-to-cart, checkout — and flags a broken or disabled buy button with a screenshot, so you hear about it from us, not from a lost sale. You can run one free scan right now, and the paid Bilby checks every night from $29/mo.

Frequently asked questions

Why is my add-to-cart button not doing anything when clicked?
Usually a JavaScript error on the page — often from a recently installed app or a theme edit — stops the click handler from firing. Open the browser console (F12) and reload the product page; a red error there usually points at the culprit. Other causes: an unselected or out-of-stock variant, or a theme update that changed the button.
Why is my add-to-cart button greyed out?
A greyed-out button almost always means the selected variant is out of stock, or a required option (size, colour) hasn't been chosen. If it's disabled even for in-stock, fully-selected variants, a theme or app is incorrectly gating it — check for a recent change to the product form.
Could an app be breaking my add-to-cart button?
Yes — one of the most common causes. Apps that inject JavaScript can conflict with your theme or each other and break the cart. Disable recently installed apps one at a time and re-check the button after each.
How do I know it's broken for customers and not just me?
Test in incognito (rules out login and cache), on mobile and desktop, on your live theme. If it works for you but customers report failures, it's often device- or variant-specific. A tool that walks your store like a real first-time customer catches these without you refreshing every product page.

Keep reading: Did your checkout break after a theme update? · How Bilby watches your store · Free Tracking Health Check

// Catch it before a customer does

Is your store
actually okay?

Bilby walks your store like a customer and reports anything broken, slow, or confusing — with screenshots. One free scan, no signup.

Scan my store free