Why isn't my add to cart button working?

Topic summary

Add-to-cart buttons stopped working across products shortly after the store owner removed some apps; it had worked earlier the same day. The owner is unsure what to look for in the code and shared a product link.

Most recent findings point to two likely causes:

  • Custom JavaScript error in product‑form.js: A responder’s screenshot flags an issue and advises removing the last code segment in that file.
  • Missing jQuery dependency: Another responder notes site code relies on jQuery that was likely injected by a removed app. They recommend editing theme.liquid and adding jQuery right after to restore the dependency. (The exact script snippet wasn’t included in the post.)

Additional report: Another user reports the same symptom; a helper requests their product page URL and notes such issues are typically JS-related.

Key terms: jQuery is a JavaScript library many themes/scripts depend on for DOM manipulation and events.

Action items:

  • Remove/adjust the problematic code at the end of product‑form.js.
  • Re-add jQuery in theme.liquid (after ), if the theme’s scripts depend on it.
  • Share affected product URLs for targeted debugging.

Status: Unresolved/ongoing; no confirmation yet that the fixes restored the button.

Summarized with AI on December 11. AI used: gpt-5.

My add to cart button isn’t working on any of my items. It worked fine this morning. I deleted some apps off my website today. I went through the code like the discussion boards said to and I don’t know exactly what I’m looking for.

https://abshtuff.com/products/copy-of-gamer

1 Like

@ABSHTUFF

sorry but your add to cart button issue your custom js file please remove your last in product-form.js

see issue

It looks like you have code that depends on jquery which was likely being loaded to your site by one of the apps you removed. Editing your theme as follows will add jquery back in:

  1. Go to Online Store → Themes

  2. From the Actions Drop Down Button, select Edit Code

  3. Search for and open theme.liquid

  4. Find (note the closing slash)

  5. On it’s own line after , add in jquery with the following code and save your template file:


1 Like

Hi there, my add to cart button is not working either, could someone help me out please ?

@user3004 what issue are you facing? in most of the cases it has to do with the js code, can you please share your product page link?