// Troubleshooting · Storefront
Why is my add-to-cart button not working on Shopify?
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:
- List apps you installed or updated just before the problem started.
- Disable them one at a time (or pause their script embeds under Online Store → Themes → Customize → App embeds).
- 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.
Frequently asked questions
Why is my add-to-cart button not doing anything when clicked?
Why is my add-to-cart button greyed out?
Could an app be breaking my add-to-cart button?
How do I know it's broken for customers and not just me?
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 →