PHPackages                             run\_as\_root/ext-magento2-product-priorities - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Admin Panels](/categories/admin)
4. /
5. run\_as\_root/ext-magento2-product-priorities

ActiveMagento2-module[Admin Panels](/categories/admin)

run\_as\_root/ext-magento2-product-priorities
=============================================

This module provides a product priorities column inside Admin Products Grid.

031PHP

Since Oct 28Pushed 3y ago2 watchersCompare

[ Source](https://github.com/run-as-root/Magento2-Product-Priority)[ Packagist](https://packagist.org/packages/run_as_root/ext-magento2-product-priorities)[ RSS](/packages/run-as-root-ext-magento2-product-priorities/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

   title RunAsRoot Product Priorities   keywords run\_as\_root, priority, bestseller, grid, form   module\_name RunAsRoot\_ProductPriorities   author David Lambauer, Denys Sliepnov   send\_questions\_to david@run-as-root.sh   category Marketing  General
-------

[](#general)

Provides a product priorities column inside Admin Products Grid.

Installations
-------------

[](#installations)

```
composer require run_as_root/ext-magento2-product-priorities
bin/magento setup:upgrade

```

Features
--------

[](#features)

### 'Priority' column inside 'Products' grid

[](#priority-column-inside-products-grid)

`Priority` column includes the proportion value of relevance for each product. These values should match the Priority Matrix.

`Priority Matrix`

Priority nameRelevance proportion value %Cell background colorA90greenB80light-green.........F0red`Priority Matrix` is editable (data stores at the database inside `run_as_root_product_priorities` table). There are initial values. `Priority Name` and `relevance proportion value %` fields must be unique.

Admin can adjust priority for a specific period of time.

Priority value calculates by the next formula:

1. report data loads for the specific period of time from the table `sales_bestsellers_aggregated_daily`
2. system finds the product with the greatest `ordered_qty` value and marks the target product as top bestseller (takes the highest priority value from the matrix, i.e. `A`)
3. system walks through other products and calculates priority value by the formula: 4. `targetProduct['ordered_qty'] * 100 / topBestsellerProduct['ordered_qty'] = targetProduct['proportion_value']`5. system fetches the max `relevance proportion value` from the `Priority Matrix` that is less than `targetProduct['proportion_value']`

Technical Specification
-----------------------

[](#technical-specification)

### Api

[](#api)

#### `RunAsRoot\ProductPriorities\Api\Data\ProductPriorityInterface`

[](#runasrootproductprioritiesapidataproductpriorityinterface)

Defines all the getters and setters for the Product Priority entity.

#### `RunAsRoot\ProductPriorities\Api\ProductPriorityRepositoryInterface`

[](#runasrootproductprioritiesapiproductpriorityrepositoryinterface)

Gives access to persistent data entities. Have the following methods:

- `save(ProductPriorityInterface $productPriority)`: Creates a new record if no id present, otherwise updates an existing record with the specified id.
- `get(int $entityId)`: Performs a database lookup by id and returns a data entity interface
- `delete(ProductPriorityInterface $productPriority)`: Deletes the specified entity
- `deleteById(int $entityId)`: Deletes the specified entity by id

### Block

[](#block)

#### `RunAsRoot\ProductPriorities\Block\Adminhtml\ProductPriority\Buttons\GenericButton`

[](#runasrootproductprioritiesblockadminhtmlproductprioritybuttonsgenericbutton)

Implements shared methods that are used inside Product Priority Form.

- `getEntityId()`: returns an id for the specific entity
- `getUrl($route = '', $params = [])`: implements urlBuilder wrapper

#### `RunAsRoot\ProductPriorities\Block\Adminhtml\ProductPriority\Buttons\BackButton`

[](#runasrootproductprioritiesblockadminhtmlproductprioritybuttonsbackbutton)

Implements back action for button if admin on the Product Priority Form page.

#### `RunAsRoot\ProductPriorities\Block\Adminhtml\ProductPriority\Buttons\DeleteButton`

[](#runasrootproductprioritiesblockadminhtmlproductprioritybuttonsdeletebutton)

Implements delete action for button if admin on the Product Priority Form page.

#### `RunAsRoot\ProductPriorities\Block\Adminhtml\ProductPriority\Buttons\SaveButton`

[](#runasrootproductprioritiesblockadminhtmlproductprioritybuttonssavebutton)

Provides save action data for the Split Save button on the Product Priority Form page.

#### `RunAsRoot\ProductPriorities\Block\Adminhtml\System\Config\Form\Field\Date`

[](#runasrootproductprioritiesblockadminhtmlsystemconfigformfielddate)

Implements DatePicker frontend\_model for System Config.

### ConfigProvider

[](#configprovider)

#### `RunAsRoot\ProductPriorities\ConfigProvider\General`

[](#runasrootproductprioritiesconfigprovidergeneral)

Implements the functionality of fetching module configurations.

- `isModuleEnabled(int $storeId)`: returns if module is Enabled/Disabled
- `getFromDate(int $storeId)`: returns start date of the period

### Controller

[](#controller)

#### `RunAsRoot\ProductPriorities\Controller\Adminhtml\Product\Priorities`

[](#runasrootproductprioritiescontrolleradminhtmlproductpriorities)

Returns the Product Priorities Grid page

#### `RunAsRoot\ProductPriorities\Controller\Adminhtml\Product\MassDelete`

[](#runasrootproductprioritiescontrolleradminhtmlproductmassdelete)

Handles the mass delete Product Priority entities on the Product Priorities Grid

#### `RunAsRoot\ProductPriorities\Controller\Adminhtml\Product\AbstractPriority`

[](#runasrootproductprioritiescontrolleradminhtmlproductabstractpriority)

Implements shared methods that are used by Controllers (Product Priority Form).

#### `RunAsRoot\ProductPriorities\Controller\Adminhtml\Product\Priority\*`

[](#runasrootproductprioritiescontrolleradminhtmlproductpriority)

Implements the CRUD actions

### DataProvider

[](#dataprovider)

#### `RunAsRoot\ProductPriorities\DataProvider\Priority`

[](#runasrootproductprioritiesdataproviderpriority)

Implements the calculation process and data provider for the 'Priority' column

- `getData()`: returns the processed data
- `prepareCollection()`: initiates and adjusts bestseller products collection
- `getPriorityByProportion(int $proportionValue)`: returns the match value from the Matrix
- `getPriorities()`: returns the Matrix data

### Model

[](#model)

#### `RunAsRoot\ProductPriorities\Model\ProductPriority\DataProvider`

[](#runasrootproductprioritiesmodelproductprioritydataprovider)

Implements data provider for Product Priority entity on the Create/Edit Form

#### `RunAsRoot\ProductPriorities\Model\*`

[](#runasrootproductprioritiesmodel)

Implement entity related models, resource model, collection, repository

### Setup

[](#setup)

#### `RunAsRoot\ProductPriorities\Setup\Patch\Data\InsertSampleData`

[](#runasrootproductprioritiessetuppatchdatainsertsampledata)

Inserts the initial data to database (`Priority Matrix`)

### Ui

[](#ui)

#### `RunAsRoot\ProductPriorities\Ui\Component\Listing\Columns\Actions`

[](#runasrootproductprioritiesuicomponentlistingcolumnsactions)

Implements Edit/Delete actions for Product Priorities Grid

#### `RunAsRoot\ProductPriorities\Ui\Component\Listing\Columns\ProductPriority`

[](#runasrootproductprioritiesuicomponentlistingcolumnsproductpriority)

Describes the 'Priority' column class

Configuration
-------------

[](#configuration)

tabgroupsectionfieldrun\_as\_rootgeneralProduct PrioritiesEnablerun\_as\_rootgeneralProduct PrioritiesFrom DateProduct Priorities Grid
-----------------------

[](#product-priorities-grid)

- Navigate to Marketing -&gt; run\_as\_root -&gt; Product Priorities

###  Health Score

15

—

LowBetter than 3% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity24

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/906aa6a77d4437e2a5eadc30ee504d17345690b7555dc3a6aedf3f5e51f0eaea?d=identicon)[DavidLambauer](/maintainers/DavidLambauer)

---

Top Contributors

[![DavidLambauer](https://avatars.githubusercontent.com/u/1841317?v=4)](https://github.com/DavidLambauer "DavidLambauer (1 commits)")

### Embed Badge

![Health badge](/badges/run-as-root-ext-magento2-product-priorities/health.svg)

```
[![Health](https://phpackages.com/badges/run-as-root-ext-magento2-product-priorities/health.svg)](https://phpackages.com/packages/run-as-root-ext-magento2-product-priorities)
```

###  Alternatives

[jeroennoten/laravel-adminlte

Easy AdminLTE integration with Laravel

4.0k4.8M43](/packages/jeroennoten-laravel-adminlte)[dmstr/yii2-adminlte-asset

AdminLTE backend theme asset bundle for Yii 2.0 Framework

1.1k1.8M67](/packages/dmstr-yii2-adminlte-asset)[dwij/laraadmin

LaraAdmin is a Open source Laravel Admin Panel / CMS which can be used as Admin Backend, Data Management Tool or CRM boilerplate for Laravel with features like CRUD Generation, Module Manager, Media, Menus, Backups and much more

1.6k68.7k](/packages/dwij-laraadmin)[filament/spatie-laravel-media-library-plugin

Filament support for `spatie/laravel-medialibrary`.

1764.8M125](/packages/filament-spatie-laravel-media-library-plugin)[bezhansalleh/filament-exceptions

A Simple &amp; Beautiful Pluggable Exception Viewer for FilamentPHP's Admin Panel

193195.9k13](/packages/bezhansalleh-filament-exceptions)[filament/infolists

Easily add beautiful read-only infolists to any Livewire component.

1220.8M36](/packages/filament-infolists)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
