Why is my add-to-cart button not working on Shopify?
Open one product that won't add to the cart in a private window, then open the browser's Console and reload the page. Look for an error message there. Then try a few other products, because "fails on all" and "fails on some" point to different causes. If you added or updated an app, or edited the theme, just before it broke, start with that.
Last updated 22 November 2026.
I'm Waqas. I fix and build Shopify stores in Sydney. This is the order I'd check things, cheapest first. It is a checking order, not a ranking of what is most common.
Only broken on phones?
If the button works on your computer but not on a phone, these three steps need no code and no Console.
- Test on the phone itself. Open your store in a private tab, on mobile data rather than your home wifi. Try the button on two or three products. Then try a second browser on the same phone, such as Safari and Chrome.
- Look for something covering the button. A cookie banner, chat bubble, pop-up or sticky bar can sit on top of Add to cart on a small screen, so your tap never reaches it. Close or scroll past each one and tap again.
- Check the phone view in your theme editor. In Online Store, click Customize, open a product page and switch the preview to the phone view. Then switch off your App embeds one at a time, as described below, and test after each.
If it still fails, note which phone and browser it fails on, and send that to your theme's or app's support. The steps below cover what to look at next.
How do I tell what kind of failure it is?
Do these four things before you change anything.
- Open your store in a private (incognito) window. Shopify's own troubleshooting guide suggests this, plus trying another device or mobile data, to rule out problems that are only on your device.
- Try the button on a few different products. Note which fail and which work.
- Note what the button does. Is it greyed out, or does it look normal and do nothing when you press it?
- Open the Console. In Chrome, press Ctrl+Shift+J on Windows or Cmd+Option+J on a Mac. Reload the page and see whether error messages appear. Errors are logged in the Console.
If it fails on every product, think of something that loads on every page: an app, a script or the theme. If it fails on only some, compare a failing product with a working one. Look at stock, variants and status.
Is Shopify itself having a problem?
Check this first because it takes ten seconds. Shopify runs a public status page at shopifystatus.com. It lists parts of the service, including Storefront and Checkout, and shows incidents. The page says issues that touch only a small share of stores may not appear there. So a green page does not prove your store is fine. A red one tells you to wait, not to start editing.
Is the product actually available to buy?
A button that won't add can be correct behaviour. Check three things in your Shopify admin.
- Stock. Go to Products, open the product, and look at the Inventory section. If Track quantity is on and Available is zero, Shopify's default is to stop selling. A product at zero can't be added to the cart unless you chose Continue selling when out of stock. Check each variant, not only the first one.
- Status. On the product page, find the Status section. Customers can buy a product only if its status is Active or Unlisted and it is published to the sales channel. Draft and Archived products can't be bought.
- Publishing. In the Publishing section of the product page, make sure the Online Store is selected.
Fix what you find, save, and test again.
Is a recently added or updated app causing it?
Shopify's troubleshooting guide says to test your apps. If the problem goes away after you remove a recently installed or updated app, contact that app's developer. Before removing anything, try the gentler step first.
- In your Shopify admin, open Online Store.
- Click Edit theme next to your theme.
- In the sidebar, click the App embeds icon. It shows an icon only, not a text label.
- Switch off one app embed at a time with its toggle, then click Save.
- Preview the store and test the button after each change.
When the button comes back, you've found the app. Send its support team the error message from the Console.
Has a removed app left code behind?
Uninstalling an app doesn't always delete the code it put in your theme. Shopify's help page says so, and its developer guidance says leftover scripts can keep running. Developers look for them in layout/theme.liquid and in the snippets folder.
I wouldn't delete theme code unless you know what it does. Shopify's help page doesn't give steps for removing it by hand. Contact the app's developer from Settings > Apps > Get support, and ask them what to remove. Or ask a developer to check your theme.
Did a theme change or update break the button?
If the fault started right after a theme edit or update, the product form may have changed. Do this safely.
- In Online Store, find your theme, click the actions button (the horizontal menu icon) and choose Duplicate. Work on the copy, which is named "Copy Of" and your theme's name.
- On your live theme, click the horizontal menu icon and choose Edit code.
- Open the file you changed. Copy its current contents somewhere safe first.
- In the Timeline view, click an entry to compare it with the current file.
- To go back, right-click the entry, choose Restore contents, then click Restore.
Know the limits. Timeline restores one file at a time, not a whole theme. It can't bring back deleted files. Its history is limited. Files in the assets folder, like JavaScript and CSS, have no Timeline. Restoring replaces the whole file, so you can lose edits you wanted to keep.
Shopify also suggests installing a fresh copy of your theme, or a free theme, and checking whether the problem appears there. If it does, look at your admin settings and apps. If it doesn't, the cause is in your theme.
Is the cart request being refused?
This one is for when the button looks fine and does nothing.
- Open DevTools, then click the Network tab, and reload the page. It only records activity after it is open.
- Press the Add to cart button.
- Look for a request with "cart/add" in its name. The Status column shows the code the server returned.
Shopify's cart add request returns a 422 code when it refuses an item. The description tells you why. It says the product is already sold out, or that you can't add more of it, or that it cannot find the variant. A "sold out" or "cannot find variant" message means going back to the stock and status checks above. If you see no request at all when you press the button, something stopped the click before it reached the cart. That points back to the Console errors and your apps.
How do I check it is fixed?
Test as a shopper would, in a private window.
- On a phone: use mobile data, not your home wifi. Open a product, choose a variant, tap Add to cart, open the cart and tap the checkout button. Stop before paying.
- On a computer: do the same, with the Console open, and look for new error messages.
- Add a second, different product. A fix that works for only one product isn't finished.
- Try one product that was failing before and one that never failed.
I make a tool called Bilby that does this walk every night and emails you when buying is broken. If you'd rather see what a shopper sees once, the free store scan does a single visit.
Related: what to check when your store is not working on mobile and finding leftover code after you uninstall an app.
Frequently asked questions
Why is my add-to-cart button greyed out?
Could an app break the button?
Why does it work for me but not for customers?
I uninstalled the app. Why is it still a problem?
Can I undo a theme edit?
Scan your own store with the free scan. It takes about two minutes and needs no sign-up.
See what Bilby finds in your store.
One free visit, the whole report: a screenshot of each step and the fix named. No signup.
Start tonight.
Type your store. Bilby walks it now and shows you what it found. Free, no card.