1

I have a store that's using a sidebar filter to filter products on my collection pages by tags, collections, vendor, and various other options. The filter is written into the theme.js

I've added an add to cart button and gone though the procedures listed in this article to "ajaxify" my cart.

https://help.shopify.com/themes/customization/products/add-to-cart/stay-on-product-page-when-items-added-to-cart.

Everything works wonderfully. The filter does what it's supposed to. The add to cart button works in both my collections pages on my home pages and the collection pages with the filter.

The only exception is that the ajaxify-cart.liquid doesn't seem to be triggered on the collection pages itself, where the sidebar is. Everywhere else is fine.

I'm guessing it's because the ajaxify-cart.liquid isn't being triggered in the sidebar.

I'm wondering if there's some code that can be added to the theme.js to achieve something like what the {% include 'ajaxify-cart' %} does in liquid files.

Am I way off with this? If so, any ideas?

As always, thanks for your time.

Jeff

Jeff
  • 23
  • 1
  • 8
  • Hi Jeff, I think its a javascript conflict issue. Can you share your website url. Regards – Dezefy Jan 06 '18 at 16:11
  • Absolutely. Here's the [Collection Page (with the sidebar filter)](https://spellbuds-dev.myshopify.com/collections/all/) and here is the [main page](https://spellbuds-dev.myshopify.com). Thanks for taking a look! @MashR. – Jeff Jan 06 '18 at 20:48
  • Hi, On your collection page, the products get loaded using javascript ajax call. That is why the ajaxify does not work on them. – Dezefy Jan 07 '18 at 05:24
  • Can you export the theme and share the file with me. I will try to solve the issue and give you instructions on how to solve the issue. – Dezefy Jan 07 '18 at 14:40
  • Hi Jeff, I fixed the theme and sent you on dropbox. – Dezefy Jan 09 '18 at 21:05
  • The solution with code fixes should be posted as an answer so that others may benefit as well. – Terminus Apr 23 '20 at 11:24

0 Answers0