Skip to content
webfixed

Guides / Shopify

Why is my Shopify add to cart button not working?

By the WebFixed team. Last updated 21 September 2026.

The short answer

A Shopify add to cart button usually stops working because of a JavaScript error in the theme, most often caused by an app or by code that an uninstalled app left behind. Other common causes are a variant that is out of stock, a product that needs an option chosen first, or a theme update that did not carry over custom code. The quickest test is to preview a fresh, unmodified copy of a free Shopify theme. If the button works there, the fault is in your theme or an app, not in your products or your Shopify account.

The most common causes

The add to cart button is run by JavaScript, the code that makes a page respond when someone clicks. If another script on the page fails first, the button can stop responding even though it looks normal.

  • An app conflict. Bundle, upsell, subscription, product option and cart drawer apps often take over the button. Two of them doing this at once is a common cause.
  • Leftover code from an app you have uninstalled. Older apps add code to theme files and cannot remove it once they are uninstalled.
  • A theme JavaScript error. A small mistake in edited theme code can stop every script after it from running.
  • Stock and inventory settings. If a variant has no stock and is not set to keep selling when out of stock, the theme shows a disabled Sold out button.
  • Variant selection. Some themes will not add to the cart until the customer has picked every option, such as size and colour.
  • A theme update. Updating a theme creates a new copy. Theme editor settings are carried over, but manual code edits usually are not.

If only one product is affected, check its stock and settings

  1. In your Shopify admin, go to Products and open the product that will not add to the cart.
  2. Check the Inventory section for each variant. Look at how many are available at the location that fulfils online orders.
  3. If the quantity is zero, either add stock or turn on the option to continue selling when out of stock.
  4. Check the Publishing section and make sure the product is available on the Online Store sales channel.

Test with a fresh, unmodified theme

A newly added theme has no custom code, and its app embeds, the app features that load on every page, are switched off. Previewing it does not change what customers see.

  1. Go to Online Store, then Themes.
  2. In the theme library, choose Add theme, then visit the Theme Store and add a free Shopify theme such as Dawn. Do not publish it.
  3. Click the three dot button next to the new theme and choose Preview.
  4. Open the same product in the preview and click Add to cart.
  5. If it works, the problem is in your live theme’s code or in an app embed. If it still fails, look again at the product settings.

Check the browser console for errors

The browser console is a panel that lists errors on the page you are viewing. You do not need to understand them fully, because the file name in each error usually shows which app or file is responsible.

  1. Open the product page on your live store in Chrome on a computer.
  2. Right click anywhere on the page and choose Inspect, then click the Console tab.
  3. Reload the page and click the add to cart button.
  4. Look for lines in red and note the file name or web address at the end of each one.
  5. If the address contains an app’s name, that app is the likely cause. If it is a theme file, the theme code has an error. Errors saying a file could not be found, often shown as 404, usually point to leftover code from a removed app.

Switch off app embeds one at a time

  1. Go to Online Store, then Themes, and click the three dot button on your live theme. Choose Duplicate so you have a backup.
  2. Click Customize on the live theme.
  3. Open App embeds in the left hand sidebar of the theme editor.
  4. Switch off one app embed, save, and test the button on your storefront in a private browser window.
  5. Repeat until the button works. The last embed you switched off is the one to raise with that app’s support team.

Switching off an app embed pauses that feature for customers, so do this at a quiet time and switch the others back on afterwards.

How to stop it happening again

  • Duplicate your theme before installing an app that changes the product page or cart.
  • Before uninstalling an app, read its uninstall instructions and remove its code while it is still installed.
  • Avoid running two apps that do the same job, such as two cart drawers.
  • After a theme update, test add to cart on the new version before you publish it.

When to get help

If the fresh theme test shows the fault is in your theme and the console points to a theme file, not an app, the fix means editing theme code, and a mistake there can break the whole product page. That is a sensible point to stop, especially if the store is losing orders while you test. WebFixed fixes this kind of problem for a fixed price agreed up front, with one-off fixes from £39 including VAT and nothing charged until you accept the quote.

Related questions

Why does the button say Sold out when I have stock?
The stock is probably held at a location that does not fulfil online orders, or the selected variant has none available even though other variants do.
Will previewing a different theme affect my live store?
No. A preview is only visible to you, and customers keep seeing your published theme until you click Publish on another one.
Can Shopify support fix a broken add to cart button?
Shopify support can check your product and inventory settings and confirm whether the platform is working normally. They do not debug custom theme code or third party apps.