Skip to content

Reference

The enumerable part of this section is written from Advanced Product Filters' own code by oce docs:reference, so it cannot drift away from what the version you installed does:

  • Settings: every setting, where it applies, what the Facets list holds, and what Advanced Product Filters fixes on purpose.
  • What this holds about a person: every column of the four tables, and why none of them is about anybody.
  • Security verdict: how Advanced Product Filters answers the shared security baseline.
  • What it costs: the queries, bytes and requests it adds to nineteen stock storefront and admin pages.

The rest of this page is the part a generated list cannot say.

The address a filtered page has

Every tick travels in one query parameter, pf, so a filtered page is an ordinary address you can bookmark, share or link to:

Facet In the address
Brand pf[brand][]=<manufacturer id>
Category pf[category][]=<category id>
A filter group pf[filter][]=<filter id>
An option pf[option][]=<option value id>
An attribute pf[attr][<attribute id>][]=<the attribute text>
Price pf[price][min]=<number> and pf[price][max]=<number>, either optional
Availability pf[stock]=1

For example, index.php?route=product/category&path=20&pf[brand][]=8&pf[price][max]=1000 is Desktops, Apple only, up to 1000 in the shopper's currency. Anything under pf that is not one of these shapes is ignored rather than refused, and a lowest price above the highest is swapped.

The four tables

Named without your store's table prefix, which is oc_ unless you changed it:

Table Holds
product_filters_index One row per product, facet value and language: which products carry which brand, category, filter, option value and attribute text. Derived from your catalogue, and rebuilt by Rebuild.
product_filters_text One row per distinct attribute text, so the index can refer to it by number. Two spellings your database compares as equal, 8gb and 8GB, are one value.
product_filters_facet The Facets list: one row per facet you saved, with its Enabled switch and Sort Order.
product_filters_memory Its own copy of your settings per store, your placements and the cron job's schedule, which is what an update puts back.

None of them is dropped when the extension is uninstalled; see limits.

What it hangs off

Advanced Product Filters edits no OpenCart file. It works through OpenCart's own events, all under the code product_filters, which you can see on Extensions → Events. Most of them appear twice, because OpenCart 4.0.2.x and 4.1.x spell a model's trigger differently and both spellings are registered.

What fires What the listener does
A product listing's rows and total (getProducts, getTotalProducts) On a filtered category or brand page, replaces them with the narrowed ones.
The same two, before they run, on search Hands Product Search the selection to narrow its results to.
The Specials page's rows and total (getSpecials, getTotalSpecials) Narrows a filtered Specials page; on 4.1 also shows each product's typed special.
Pagination, and the sort and limit links Keeps the selection on them.
The page header, and the four listing views The canonical, and noindex, follow, on a filtered page.
content_top Marks the copy of the panel a phone sees.
An order's history being added Reindexes the ordered products' options, whose stock decides what is offered.
A product or category saved or deleted, or a filter saved, in admin Updates the index for the products concerned.
Modules being deleted by code Copies your placements out before OpenCart's uninstall deletes them, so an update can put them back.

Two more rows answer the Personal Data screen and put it on the Customers menu. Every listener stands aside on a page it is not for, and the storefront ones also while Status is off, bar one: an order's history being added reindexes the ordered products whatever Status says, because the index covers every store and has to be current the moment you switch it back on. Uninstalling deletes every row.

The scheduled job

One row on Extensions → Cron Jobs, Advanced Product Filters: rebuilds the facet index, daily, running the same full rebuild as the Rebuild button. It runs from OpenCart's own scheduler, so your host has to call cron.php for it to happen; a typed address to it gets a 404.