Search by

upturnstudio / module-smart-categories

brideo

Smart categories for Magento 2 — rule-driven category membership, recomputed on save via message queue and cron.

Package info

github.com/brideo/module-smart-categories

Type:magento2-module

pkg:composer/upturnstudio/module-smart-categories

Statistics

Installs: 0

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

1.0.0 2026-09-29 23:28 UTC

This package is auto-updated.

Last update: 2026-09-29 23:46:12 UTC


README

Rule-driven categories for Magento 2.

Flag a category as smart, describe its products with a rule such as Price greater than 100 AND Color is Blue, and the module keeps the category's product list in line with that rule. Products are added when they start to match and removed when they stop.

What it does

  • Adds a Smart Rules section to the category form in admin, with the same condition builder used by the Products List widget.
  • Assigns matching products to the category and removes the rest. Products added by hand to a smart category are removed unless they match the rule.
  • Updates in the background. Saving a category or product queues the work, so saves stay fast.
  • Runs a full check of every smart category each night, to catch changes made by imports or bulk updates.
  • Provides a command to recompute on demand.

Categories that are not smart are never touched. A smart category with no conditions is emptied, not filled with the whole catalogue.

Requirements

  • Magento 2 (tested on PHP 8.4)
  • Magento_PageBuilder enabled
  • Cron running

Installation

Composer

composer require upturnstudio/module-smart-categories
bin/magento module:enable UpturnStudio_SmartCategories
bin/magento setup:upgrade
bin/magento setup:di:compile
bin/magento cache:flush

Manual

Copy the module to app/code/UpturnStudio/SmartCategories, then run:

bin/magento module:enable UpturnStudio_SmartCategories
bin/magento setup:upgrade
bin/magento setup:di:compile
bin/magento cache:flush

Usage

  1. Go to Catalog → Categories and open a category.
  2. Open Smart Rules and switch Enable smart rules on.
  3. Click +, choose an attribute, then set the operator and value. Use ALL or ANY to combine several conditions.
  4. Save.

The category updates once the queue has run. With cron running this happens on its own. To apply a rule straight away:

# One category
bin/magento upturnstudio:smart-categories:recompute --category-id=42

# Every smart category
bin/magento upturnstudio:smart-categories:recompute

Configuration

Stores → Configuration → UpturnStudio → Smart Categories

Setting Default Purpose
Enable Recompute Yes Master switch for updates on save, from the queue and from the nightly run.
Cron Schedule 0 3 * * * When the nightly full check runs.

Known limitations

  • ANY rules can miss products. A product with no value for one of the attributes in an ANY rule is left out, even when it matches another condition. ALL rules are not affected.
  • Hidden and disabled products are assigned. Products set to "Not Visible Individually" can match a rule, so the product count in admin can be higher than on the storefront.
  • Default store values only. Rules ignore store view overrides.
  • Storefront can lag behind admin. When indexers are set to "Update by Schedule", the storefront changes on the next indexer cron run.

Support

Manual test cases and the latest results are in docs/qa-test-results.md.