Why does add to cart work on some of my products but not others?

When add to cart is missing or disabled on specific products only, the cause is almost always a per-product difference in inventory settings, template assignment, or code, not a store-wide bug.

cartvariantsinventoryproduct-templates

What's going on

Most of your products let customers add to cart without any trouble, but a handful either show a disabled button, say sold out when you know stock exists, or just do nothing when clicked, with no error and no cart update. It is confusing because it is inconsistent: if the whole store were broken you would suspect a theme-wide bug, but when only some products are affected, the natural instinct is to compare them side by side and look for what is different.

That instinct is the right one. Shopify does not have a general add-to-cart failure that hits random products for no reason. When behavior differs between products, something about those specific products, their inventory settings, the template they use, custom code tied to their variant IDs, or an app that only fires under certain conditions, is different from the ones that work. The fix is to isolate what is different, rather than reinstalling apps or re-editing theme code and hoping it helps.

Why it happens

The most frequent cause is inventory policy. Shopify disables the buy button per variant when tracked inventory hits zero and continue-selling-when-out-of-stock is off for that variant. Because this setting lives at the variant level, it is normal for some products, or even some variants within one product, to behave differently from others with no other setting changed.

The second most frequent cause is template assignment. Shopify themes can have multiple product templates, and an alternate template starts from its own layout rather than inheriting sections from your main product template. If someone created an alternate template for a subset of products and it does not include the section that renders the buy box, those specific products will be missing add-to-cart while everything on the default template works fine.

A third cause is code that references a specific variant or product ID directly, which shows up most often in custom buy-now buttons, some page builders, and hand-edited theme code. Variant IDs are not stable across product duplication, and a hardcoded ID that worked when it was written can silently point at the wrong or a deleted variant later, breaking that one product while dynamically built buttons elsewhere keep working.

5 ways to fix it

1

Check inventory settings and the continue-selling option first

Open Products, select the product, and check the Inventory section for each variant that will not add to cart. If inventory tracking is on, quantity is at zero, and continue-selling-when-out-of-stock is turned off for that variant, Shopify disables the add-to-cart button and shows the product as sold out by design. This setting is per variant, not store-wide, so it is completely normal for some products to behave differently from others with nothing else changed. This is the most common cause of add-to-cart working on some products but not others, and it is free to fix yourself in the product's Inventory settings, or in bulk from the products list.

2

Check whether the product is assigned to a different template

Open the product and look at its template setting, then compare that template's layout in your theme editor against the default product template. A theme can have multiple templates, and an alternate template does not automatically inherit sections from the default one. If someone created a custom template for a promotion, bundle, or landing page and it is missing the section that renders the buy box, every product assigned to that template will be missing add-to-cart while everything on the default template works fine. Add the missing section back in the theme editor for that specific template.

3

Look for custom code that references a specific variant ID

If a developer, app, or page builder added a buy-now or add-to-cart button that references one specific variant ID instead of pulling it dynamically from the product, that reference can go stale. Variant IDs change when a product is duplicated, and they disappear if the variant is deleted or replaced, so a button that worked when it was built can quietly break for that one product while dynamically built buttons elsewhere keep working. Check your theme code or any custom blocks for hardcoded variant or product IDs and replace them with a dynamic reference to the product's current variant instead of a pasted-in number.

4

Open the browser console on a broken product page and look for script errors

On a product page where the button fails, open your browser's developer console, click add to cart, and watch for errors. A theme customization, or a script from an app such as a reviews widget, upsell tool, or personalization app, can throw an error that breaks the add-to-cart form only on certain product pages while leaving others untouched, especially if the app targets specific products or collections. Narrow it down by disabling apps one at a time, or by checking the same product on a copy of your theme with customizations reverted, to see whether the problem is an app conflict or something in your theme code.

5

Check for channel, market, or catalog restrictions on the product

Less commonly, a product page can render normally while purchasing is withheld for a specific visitor because of how the product is set up for sale. Check the product's sales channel and availability settings, and if you sell in multiple countries or use separate pricing by market, check whether that product is available for purchase in the market the customer is viewing from. A wholesale or restricted catalog can behave the same way, showing the product but not the buy button to visitors outside the intended audience.

Bottom line

Add-to-cart working on some products but not others is a symptom, not a single bug, and it almost always traces back to one product being configured or coded differently from the rest. Start with inventory policy, since it explains the majority of cases, then work through template assignment, hardcoded code references, and app conflicts. Most of this is a free fix you can do yourself in Shopify admin or the theme editor; if the cause turns out to be a conflict between multiple apps that touch the cart, a developer can save you the trial and error of disabling them one by one.

Still Stuck?

Browse the rest of the problem library, run a free storefront scan to catch issues like this automatically, or email us and we'll work out a custom solution for it.