Skip to main content
Add to cart failures come from four places: the Shopify product setup, a third-party app, custom code, or the theme. This guide isolates which one before you change anything. Work through the checks in order and retest after each.

Start with the product

Most failures are configuration, not code. If the product fails any of these, the button is behaving correctly and the fix is in Shopify. See Product shows sold out.

Then isolate the cause

1

Compare editor and live preview

Test the same product in the theme editor preview and on the live storefront. A failure in only one points at the editor rather than at your setup.
2

Test in incognito

Open a private window with no extensions. Browser extensions, especially ad and script blockers, break add to cart regularly.
3

Test another device

Try a phone as well as desktop. A failure on only one points at a layout or script problem specific to that breakpoint.
4

Test a clean theme copy

Duplicate the theme, remove your custom code from the copy, and test the same product. If the clean copy works, your custom code is the cause.
5

Test with apps disabled

Disable one suspect app at a time in the test copy and retest. See App conflicts.
6

Capture the console

If it still fails, open the browser console and reproduce the failure. The error text is the fastest route to a fix.
Change one thing at a time and retest. Disabling three apps at once tells you the group is responsible but not which one.

Symptoms and likely causes

Usually a JavaScript error stopping the handler. Check the console first. Common sources are a cart or upsell app injecting a script, a page builder, and custom JavaScript added to the theme.
A known Shopify theme editor behaviour, usually down to Markets. The editor previews a country the product is not available in, so the button cannot add. Use the country selector at the top of the theme editor to switch to a country the product does sell in, then try again. If it adds there, nothing is wrong with your theme or your product.
The theme thinks the variant is unpurchasable. Check inventory, location, and market for that specific variant, not just the product.
Typically an older theme version conflicting with a newer Shopify or app behavior. Update the theme on a duplicate, see Updating safely.
Check that each image is assigned to the intended variant in Shopify, and that variant names match what the theme expects. A subscription, bundle, or product-option app can also rewrite the line item.
Check for an element overlapping the button on small screens, such as a sticky bar or a cookie banner. Test with the sticky add to cart both on and off.
That points squarely at product configuration rather than the theme. Compare a working product against a failing one field by field.
Promotion rules can block a line item. Test with a simple cart containing only the qualifying product. See Free gifts and Upsells.

If it is still not resolved

  • The product and variant URL
  • Your theme version
  • Browser, device, and operating system
  • The list of cart, upsell, subscription, and product-option apps installed
  • A screenshot of the browser console error