Skip to content

Instantly share code, notes, and snippets.

Last active February 27, 2023 20:07
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
[PATCH] No sliders add to cart bug -- [bug fixed in v4.0.1]

What is this?

This is a patch for v4.0 of Bullet. The following resolves a bug where the "Add to cart" button would cease functioning if both media sliders are turned off. You can use the following fix so you do not have to upgrade to Bullet v4.0.1.


  1. From Shopify admin, go to Actions → Edit code
  2. In the search bar type product.js, then open the file.
  3. Scroll to line 268
  4. On line 268 substitute the code you see with the following:
if (this.pageTotalElement) this.totalPages = this.pageTotalElement.getAttribute('counter-total');
  1. Save

step-1 step-2

When you are done, line 268 should look like this: final-step

No code workaround

This workaround consists into enabling one or two of the media sliders. This will resolve the problem without having to edit the theme's code.

  1. From your Shopify admin, go to Online Store > Themes.
  2. Find the theme you want to edit, then click Customize.
  3. Select Products > Default product from the top bar drop-down menu
  4. Then in the side bar, click Product page
  5. Under Media for either Desktop media style or Mobile media style select Slider
  6. Save
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment