Filter Functionality Issue and Errors

Hey,

I’m having some trouble with my filters they don’t work as you can see in the image i can check any box but nothing happens, i have tried looking into the code but have not been able to fix it. Then i found all these errors and thought it might have to do something with it.

my store: https://r1vex.myshopify.com/

Go to ‘Online Store’ → Theme → Edit Code, locate the file ‘facets.js’ find line 65 and add backticks to the template literal like this:

const url = `${window.location.pathname}?section_id=${section.section}&${searchParams}`;

bruv my coding skills ain’t good, how do i know what backticks to add to the template

Jump to Edit code and find the file “facets.js

on like no 65 add code

const url = `${window.location.pathname}?section_id=${section.section}&${searchParams}`;

i added it like this:

maybe it’s wrong because it gave more errors:

Go to line 65 of facets.js and replace the line with this:

const url = `${window.location.pathname}?section_id=${section.section}&${searchParams};`
  1. Go to ‘Online Store’ → Theme → Edit Code

  2. In the assets folder find the file ‘facets.js’

  3. Copy the below code

const url = `${window.location.pathname}?section_id=${section.section}&${searchParams}`;
  1. Go to line 65, and replace the line which looks like this
const url = ${window.location.pathname}?section_id=${section.section}&${searchParams};

with the code you just copied.

  1. After everything it should look like this:
sections.forEach((section) => {
  const url = `${window.location.pathname}?section_id=${section.section}&${searchParams}`;
  const filterDataUrl = (element) => element.url === url;

  FacetFiltersForm.filterData.some(filterDataUrl)
    ? FacetFiltersForm.renderSectionFromCache(filterDataUrl, event)
    : FacetFiltersForm.renderSectionFromFetch(url, event);
});