DriversRecommendedOutdated drivers can make a good PC feel brokenScan driver issues before chasing fixes manually.Scan NowOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsSlow PC?RecommendedPC slow today? Run a repair scan before it gets worseResolve common Windows issues and optimize system performance.Scan Now×
Skip to content
World desk4 min

How to Fix an Add to Cart Button That Isn’t Working

Check whether the cart page contains the product after a refresh, then troubleshoot the failed request or stale mini-cart using the steps for WooCommerce or Shopify.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

First check whether the product appears on the cart page after you refresh it. If it does, adding worked and the problem is likely the mini-cart or drawer display. If the cart stays empty, check the add request, product details, and platform-specific setup. The steps differ between WooCommerce and Shopify, so identify your platform and whether the product is simple or requires a variation before changing code.

Identify where the add-to-cart flow fails

Click the button once, then open the cart page and refresh it. Note what happens:

As an Amazon Associate I earn from qualifying purchases.

  • Nothing happens: A JavaScript error, disabled button, or broken click handler may be preventing the request.
  • An error appears or the cart remains empty: The request may have failed, or its product ID, variant, or quantity may be invalid.
  • The cart page shows the item, but the mini-cart does not: The add operation may have succeeded while the cart display failed to refresh.
  • The button is disabled: For a variable product, select an available option first. The button may remain disabled until a valid variation is selected and initialized.

Record the platform, product type, exact behavior, and any visible error. These details help distinguish an add-request problem from a display problem.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Check a WooCommerce add-to-cart button

Look for JavaScript errors

  1. Open the affected product page in a desktop browser.
  2. Open Developer Tools and select the Console tab.
  3. Click the add-to-cart button and look for errors that appear at the click or during page load.

A JavaScript error can interrupt cart behavior and other page features, as WooCommerce explains in its JavaScript troubleshooting guidance.

#1 Best Overall
Sale
Logitech M185 Compact Ambidextrous Wireless Mouse with Rubber Grips - Blue
  • Compact Mouse: With a comfortable and contoured shape, this Logitech ambidextrous wireless mouse feels great in either right or left hand and is far superior to a touchpad
  • Durable and Reliable: This USB wireless mouse features a line-by-line scroll wheel, up to 1 year of battery life (2) thanks to a smart sleep mode function, and comes with the included AA battery
  • Universal Compatibility: Your Logitech mouse works with your Windows PC, Mac, or laptop, so no matter what type of computer you own today or buy tomorrow your mouse will be compatible
  • Plug and Play Simplicity: Just plug in the tiny nano USB receiver and start working in seconds with a strong, reliable connection to your wireless computer mouse up to 33 feet / 10 m (5)
  • Better than touchpad: Get more done by adding M185 to your laptop; according to a recent study, laptop users who chose this mouse over a touchpad were 50% more productive (3) and worked 30% faster (4)

Inspect the request in Network

  1. In Developer Tools, select Network.
  2. Click the add-to-cart button again.
  3. Inspect the new request, including its status, headers, submitted data, and response.

WooCommerce recommends using the Network tab to inspect AJAX errors and the server response. See its AJAX troubleshooting steps. A failed request points to a different issue than a successful request followed by a stale mini-cart.

Check the product ID and archive behavior

If the button uses an add-to-cart URL, confirm that it includes a valid product ID. If customers should be able to add products from a product archive without a page reload, check WooCommerce’s Enable AJAX add to cart buttons on archives setting. WooCommerce documents the URL and setting in its product shortcode and add-to-cart documentation. This setting concerns archive behavior; it is not a universal fix for every theme or plugin conflict.

Rank #2
Sale
Logitech G305 Lightspeed Wireless Gaming Mouse - Black | 12,000 DPI, Lightweight, 6 Programmable Buttons, 250h Battery, On-Board Memory, Compatible with PC and Mac
  • The next-generation optical HERO sensor delivers incredible performance and up to 10x the power efficiency over previous generations, with 400 IPS precision and up to 12,000 DPI sensitivity
  • Ultra-fast LIGHTSPEED wireless technology gives you a lag-free gaming experience, delivering incredible responsiveness and reliability with 1 ms report rate for competition-level performance
  • G305 wireless mouse boasts an incredible 250 hours of continuous gameplay on just 1 AA battery; switch to Endurance mode via Logitech G HUB software and extend battery life up to 9 months
  • Wireless does not have to mean heavy, G305 lightweight mouse provides high maneuverability coming in at only 3.4 oz thanks to efficient lightweight mechanical design and ultra-efficient battery usage
  • The durable, compact design with built-in nano receiver storage makes G305 not just a great portable desktop mouse, but also a great laptop travel companion, use with a gaming laptop and play anywhere

Check variable-product behavior against your version

For a variable product, select an available variation and verify that the product page has initialized its variation behavior. Also check the installed WooCommerce version and any theme overrides. WooCommerce’s January 2026 advisory described a variable-product button disabled until variation code initialized, but its February 18 update says the change was reverted in WooCommerce 10.5.2. Treat that advisory as version-specific history, not as a blanket instruction to apply an old fix: WooCommerce’s advisory and update.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

When the mini-cart stays stale

If the item appears on the refreshed cart page but not in the mini-cart, focus on the display update rather than assuming the add request failed. WooCommerce’s Cart and Mini-Cart blocks rely on add-to-cart events to update their contents. Check whether the theme or custom code is interfering with those events; see the WooCommerce block hook alternatives documentation.

Rank #3
Logitech M510 Full Size Ambidextrous 2.4 GHz Wireless Mouse
  • Your hand can relax in comfort hour after hour with this ergonomically designed mouse. Its contoured shape with soft rubber grips, gently curved sides and broad palm area give you the support you need for effortless control all day long.
  • You’ve got the control to do more, faster. Flipping through photo albums and Web pages is a breeze, especially for right-handers—with three standard buttons plus Back/Forward buttons that you can also program to switch applications, go full screen and more. And side-to-side scrolling plus zoom gives you the power to scroll horizontally and vertically through your music library, maps and Facebook feeds, and zoom in and out of photos and budget spreadsheets with a click.* * Requires Logitech SetPoint software (Windows) or Logitech Control Center software (Mac OS X)
  • Two years of battery life practically eliminates the need to replace batteries. ** The On/Off switch helps conserve power, smart sleep mode extends battery life and an indicator light eliminates surprises. ** Battery life may vary based on user and computing conditions.
  • The tiny Logitech Unifying receiver stays in your laptop. There’s no need to unplug it when you move around, so there’s less worry of it being lost. And you can easily add compatible wireless mice and keyboards to the same wireless receiver.

Check a Shopify add-to-cart button

For a Shopify-hosted theme

Shopify’s Ajax API is for Shopify-hosted themes, not custom storefronts. In a theme, use the documented Cart API add request with a locale-aware URL, the intended variant ID, and the desired quantity. Inspect the request and response in Developer Tools’ Network tab and confirm that the selected variant is the one being submitted. Shopify documents the API’s scope in its Ajax API overview and the add operation in the Cart API reference.

For a custom storefront, do not copy a theme Ajax API example as though it were the correct integration. Use the implementation path appropriate to that storefront.

Rank #4
Sale
Logitech M240 Compact Silent Bluetooth Wireless Mouse - Graphite
  • Pair and Play: With fast, easy Bluetooth wireless technology, you’re connected in seconds to this quiet cordless mouse —no dongle or port required
  • Less Noise, More Focus: Silent mouse with 90% reduced click sound and the same click feel, eliminating noise and distractions for you and others around you (1)
  • Long-Lasting Battery Life: Up to 18-month battery life with an energy-efficient auto sleep feature, so you can go longer between battery changes (2)
  • Comfortable, Travel-Friendly Design: Small enough to toss in a bag; this slim and ambidextrous portable compact mouse guides either your right or left hand into a natural position
  • Long-Range: Reliable, long-range Bluetooth wireless mouse works up to 10m/33 feet away from your computer (3)

For an embedded Buy Button

If the button is an embedded Shopify Buy Button, check the browser Console for errors, confirm that the referenced product still exists, and test the embed on a simple page. If it works on the simple page but not on the live site, the site’s CSS or JavaScript may be interfering. Shopify outlines these checks in its Buy Button troubleshooting guide.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Choose the fix based on the evidence

What you find Where to focus
The cart stays empty and the request fails Read the request status and response; verify product or variant data and investigate browser errors.
The cart stays empty, but no request appears Check for JavaScript errors, a disabled button, or a click handler that is not running.
The cart page contains the item after refresh, but the mini-cart does not Investigate the theme, drawer, or cart-block refresh behavior.
A variable-product button remains disabled Select an available variation and check version-specific variation initialization and theme overrides.

Do not paste WooCommerce code into a Shopify theme or Shopify theme code into WooCommerce. If the request is difficult to interpret or the issue persists after checking the relevant platform behavior, WooCommerce recommends seeking help from a developer familiar with the site’s JavaScript and setup.

Best Value
Amazon Basics 2.4 GHz Wireless Optical Computer Mouse with USB Nano Receiver, Portable, No Wires, Smooth Tracking, Multi-Device Compatibility, Black
  • Smooth, precise and affordable wireless optical 3-button mouse with USB nano receiver for laptop, desktop and netbook PCs
  • 2.4 GHz wireless (not Bluetooth) provides a powerful, reliable connection
  • Nano-receiver stays in the PC USB port or stows conveniently inside the wireless mouse when not in use (note: Receiver is stored within the mouse from production and needs to be removed upon setup)
  • Compatible with Windows 2000, XP, Vista, 7, 8, and 10
  • Easy installation - refer to user manual for instructions

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
Windows Errors? Fix Them Before They SpreadFree repair scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.