BitFacet is a catalog filter for MODX 3: checkboxes, from/to ranges, sorting, search and paging, with a product count next to every value. Data comes from resources, TVs, MiniShop3 (product fields, options, vendors, extra categories, variants) and your own tables.
The filter does not query the database on every request. The component builds an index in advance — bitmaps "value → products" — and keeps it in opcache. A request with any number of checked filters is computed from the index in a few milliseconds even on hundreds of thousands of products. When products change, the index updates itself.
/catalog/color-red/ — friendly URLs (friendly_urls) and a catalog page URL ending with "/".example filter set: with MiniShop3 — products, vendor, color, size, tags, "In stock", price, weight; without MiniShop3 — all resources of the web context, section and template. The set is on the Filter sets tab.bitfacet.example template to a catalog section (resource → Template). The template already has the filter and SEO snippets, styles and the script for filtering without page reloads. For your own template see the example below.Three lines are enough: the SEO snippet at the top of <head>, the filter in the page body and the script before </body>.
[[!BitFacetSeo? &set=`auto`]]
[[!+bitfacet.title:default=`[[*pagetitle]]`]]
...
[[!+bitfacet.h1:default=`[[*longtitle:default=`[[*pagetitle]]`]]`]]
[[!+bitfacet.text]]
[[!BitFacet? &set=`auto` &limit=`24`]]
[[!…]]): the output depends on the URL.&set=`auto` — the set is chosen automatically: the first one whose Sections contain this page or its ancestor. You can name it: &set=`example`.bitfacet.js the filter still works — by regular form submission. With the script it works without page reloads and updates the browser address.bitfacet.example template (the <style> block)./catalog/brand-nike/.