When "Add to cart" does nothing, the cart shows an error, or items disappear, the cause is usually code on the storefront: your theme's cart code, or an app that changes the cart (upsells, bundles, subscriptions, discounts). Preview an unedited copy of your theme. If the cart works there, the problem is in your theme edits or an app's code. Also check the product: stock, variants and sales channel availability.
What's the problem
"Add to cart" does nothing or shows an error, the cart is empty after adding items, quantities can't be changed, or the cart page won't load.
Why it happens
- Theme code edits to the product form or cart broke something.
- An app that changes the cart (upsell, bundle, subscription, discount) fails or conflicts with another.
- A theme update replaced code your apps relied on.
- Stock and product settings: out of stock, a variant unavailable, or the product not published to the online store.
- A JavaScript error stopping the button working. The browser console shows it.
How to fix it
- Open the browser console (F12) on the product page and click "Add to cart". Note any red error and which file it names.
- Preview an unedited theme: duplicate your theme or preview the theme's original version, and test the cart there.
- If the cart works there, the cause is in your theme edits or an app's code. Undo recent edits or disable recently added cart apps.
- Check the product's stock, variants and availability on the Online Store sales channel.
- Before editing theme code again, duplicate the theme so you can go back.
What Preventionlabs checks
One click runs the full report on your domain. For this problem it shows your store: whether the password page is on, products are in stock and the cart works; whether your site loads, how fast, and where its redirects go; up to 50 pages from your sitemap, listing any that fail or are slow, plus broken links on them; script libraries on your homepage with published security holes; every outside service your homepage loads scripts and files from. It doesn't place orders or see your Shopify admin, so check Settings and your apps there too.
Run your free reportYour first report is free, no card needed. Then A$50 a month, up to 10 domains. Read-only: it never changes anything.
Sources
Preventionlabs is independent and not affiliated with Shopify. Product names are used only to describe the problem.
← All of Shopify