For OpenCart 2.3, 3.0, 4.0 and 4.1
What shoppers can filter by
- Price: from and to boxes. The boxes show the range of the page, and prices are compared the way the shopper sees them (with tax, in the chosen currency).
- Brand: the manufacturers of the products on the page, several at once.
- In stock only: offered when some products on the page are out of stock.
- On sale: offered when some products have a current special price for the shopper's customer group.
- Rating: 4, 3, 2 or 1 stars and up, from the same rating the product cards show.
- Attributes: one group per product attribute (for example Material or No. of Cores) with its values.
- Options: one group per select, radio, checkbox or image option (for example Size or Colour) with its values.
- Several values in one group are OR-ed (Cotton or Wool); different groups are AND-ed (Cotton and Brand A).
Counts that stay honest
- The number next to each choice is the number of products you would get, with the other filters applied.
- Choices that were ticked stay visible even when their count falls to 0, so a shopper can always undo a filter.
- A group is hidden when it could not narrow anything.
- Long lists show the first values and a "Show more" button (the number is a setting). Chosen values are always visible.
No page reload
- The product list, the "Showing 1 to 3 of 8" text and the pagination are replaced in place when a choice is ticked.
- The address bar changes, so a filtered page can be shared, bookmarked and used with the browser's back and forward buttons. "Clear all" returns to the plain list.
- Sorting, products per page and page links keep the chosen filters.
- Without JavaScript, or with the setting "Update the list without reloading" off, the panel works as an ordinary form with an Apply button.
- On a phone the panel is folded away behind a "Filters" button that shows how many filters are active.
Where it shows
- Category pages, brand (manufacturer) pages and search results, each with its own on/off switch.
- The panel goes into the theme's left column when there is one, otherwise above the products. Tested with Aurora on every version and with the default theme on 4.0 and 4.1.
- The filtering is done on the shop's own product list, so the order, the paging and the totals follow it. The sort orders of the shop (default, name, price, rating, model, date) keep working.
For the store owner
- One settings page with switches for every filter, the number of attribute/option groups and values shown, the panel title, counts on or off, and an accent colour (with preset colours and a live preview).
- No database tables. Uninstalling removes the settings and the events; nothing is left behind.
- Every text the shopper sees is in a language file in the module. Copy it into another language folder and translate the text on the right of each line; admin texts are in the admin language file.
- Malformed or hostile values in the address are ignored.
Notes
- The panel works from the product list of the page itself, read with one query (up to 5000 products per category, brand or search). A page with more than 5000 products shows no panel and keeps the shop's own list.
- Search pages match the product name, tag and model like the core search; the filter does not search other product fields.
- While a filter is ticked, the shop's built-in "Filter" groups (the core category filter) are not applied; use one or the other.
- Prices are compared before the shopper picks a quantity (quantity discounts are not part of the price filter).
- Filter results are shown at the same address with extra parameters (pf_...); SEO URLs are not created for them.
- On a phone the "Filters" button that folds the panel needs JavaScript.