Command line interface
This page contains console commands used when operating with the Product Label extension.
Base command
php -f bin/magento mirasvit:label:indexer
Base command of the extension. This command requires one of the following options.
| Option | Description |
|---|---|
| --status | displays information about Product Label index |
| --reindex-all | run full reindex of Product Label index |
| --reindex-new | run reindex of Product Label index for recently created/updated products |
Emulate cron
php -f bin/magento mirasvit:label:emulate:cron
Manually runs the extension's cron job instead of waiting for its scheduled execution. Use this to immediately apply label changes without waiting for the periodic cron run mentioned in Labels.
Recalculate popularity figures
php -f bin/magento mirasvit:label:metric:reindex
Recalculates the sales & engagement figures used by the Product Popularity conditions and the sales & engagement variables. The same calculation runs automatically once a day, at 00:30. Run the command after installing or upgrading the extension so the figures exist before the first cron run, or whenever you need fresh figures right away.
| Option | Description |
|---|---|
| --store-id | Recalculates the figures for one store view only. Without it, all store views are recalculated. |
The command also re-applies the labels that use popularity figures, for the products whose figures changed, and cleans their cached pages. If another figure recalculation is already running for a store view, that store view is skipped and the command reports it.