elgentos / magento2-inventory-log

elgentos/magento2-inventory-log

Magento 2 - Inventory Log

magento2-module Compatibility: 2.4.7 Code Quality: Fail Tests: N/A Security: Pass OSL-3.0

Magento 2 - Inventory Log

This extension was originally written by KiwiCommerce but has been archived since November 2020. Since we (at elgentos) feel this extension is the best inventory logger extension available, we decided to adopt it.

Overview

  • Keep the log of product inventory for every single transaction. Ex. Product import, Order placed, Insert/Update operation through queries and lot more.
  • Admin knows when and why the inventory changed.
  • This extension keeps a log of inventory when:
    • Order placed from frontend, admin and API
    • Product import
    • Manually product inventory change by admin
    • Directly inventory insert update in a database
    • Product created using API
    • Credit Memo generation
    • Order fail and Cancel

Installation

This extension only works on Magento 2.4.x. Upgrade y'all.

composer require elgentos/magento2-inventory-log
php bin/magento setup:upgrade

Inventory Log per Product

Navigate to Product > Catalog and Click on edit link of the product. Then click 'Inventory Log' under Quantity option. You'll see a graph plotting the 100 most recent stock movements, and a grid showing all stock movements.

image

Inventory Log Grid

A grid with all stock movement can now be found under Reports > (Products) Stock Movement.

image

Stock Movement Graph

From the Inventory Log Grid, you can click on Graph to see the same graph as on the product edit page;

image

Configuration

You need to follow this path. Stores > Configuration > Catalog > Inventory > Stock Options > Inventory Log Enabled.

Constraints

  • Database user must have to get the create trigger permission in order to use this extension.
  • After enabling disabled extension using the command, admin/user will have to enable the extension again from the store configuration.

Contribution

Lots of thanks goes to KiwiCommerce for initially developing this extension. We know open-source maintenance is hard, so we appreciate it!

No changelog yet

The vendor hasn't published a changelog. Tagged releases appear in the Versions tab.

Versions
Version Stability QA Status Compatibility Released
1.1.8 stable Fail Magento 2.4.7 Details 2024-10-01 07:32:13
1.1.7 stable Not tested Not yet tested Details 2024-02-02 12:19:40
1.1.6 stable Not tested Not yet tested Details 2023-12-06 16:00:16
1.1.5 stable Not tested Not yet tested Details 2023-03-24 08:45:12
1.1.4 stable Not tested Not yet tested Details 2021-10-05 06:30:56
1.1.3 stable Not tested Not yet tested Details 2021-05-24 06:23:28
1.1.2 stable Not tested Not yet tested Details 2021-05-23 20:25:34
1.1.1 stable Not tested Not yet tested Details 2021-05-23 12:18:31
1.1.0 stable Not tested Not yet tested Details 2021-05-23 12:00:59
1.0.2 stable Not tested Not yet tested Details 2018-06-20 07:09:34
1.0.1 stable Not tested Not yet tested Details 2018-06-13 12:50:38
1.0.0 stable Not tested Not yet tested Details 2018-06-11 07:19:22

Requires 1

Package Constraint
hyva-themes/module-magento2-admin *

Compatibility

Each Magento release line is installed on its supported PHP versions, then the module is built (DI compilation + static-content deploy) and its unit and integration suites are run. The matrix shows the lines and PHP versions the module is confirmed to install and run on. Code-quality results further down (phpstan, phpcs, …) are reported separately and never affect compatibility.

Compatibility matrix (Magento × PHP)
Magento PHP 8.2 PHP 8.3 PHP 8.4 PHP 8.5
2.4.7 Pass Pass
2.4.8 Pass Fail di error
2.4.9 Fail di error Fail di error

Code Quality

Advisory checks against the module's source. Static analysis runs once across the whole module; PHPStan re-runs per Magento + PHP version because resolvable symbols differ between releases. These NEVER affect the Compatibility badge — a phpcs finding can't make a module incompatible.

Static analysis

Coding standards (phpcs), mess detection (phpmd), copy-pasted code (cpd), PHP cross-version compatibility, composer.json validity. Each runs once for the whole module.

Static analysis results
Tool Status Findings Summary
PHPCS Fail 114 24 errors, 90 warnings (ruleset: Magento2) — 29 auto-fixable with phpcbf
PHPMD Warning 53 53 rule violations (UnusedFormalParameter:16, UndefinedVariable:14, MissingImport:6, UnusedLocalVariable:5, CyclomaticComplexity:3)
Cpd Pass 0
Composer validate Info 1 valid; 1 advisory note (composer validate --strict)

PHPStan

Type-checks the module's PHP against a real Magento install at the configured gate level. Re-runs per Magento and PHP version because resolvable symbols differ between releases. Cell → details modal.

PHPStan results by Magento and PHP version
Magento PHP 8.2 PHP 8.3 PHP 8.4 PHP 8.5
2.4.7 90 90
2.4.8 90 101
2.4.9 101 101

Tests

Unit and integration suites, run for each applicable Magento and PHP version. A test failure speaks to the module's behaviour, not its compatibility with a Magento line, so it is reported here separately and never reddens the compatibility matrix.

Unit tests

Unit tests results by Magento and PHP version
Magento PHP 8.2 PHP 8.3 PHP 8.4 PHP 8.5
2.4.7 N/A N/A
2.4.8 N/A N/A
2.4.9 N/A N/A

Integration tests

Integration tests results by Magento and PHP version
Magento PHP 8.2 PHP 8.3 PHP 8.4 PHP 8.5
2.4.7 N/A N/A
2.4.8 N/A N/A
2.4.9 N/A N/A

Security

Security checks run directly against the module: an audit of its declared dependencies for known vulnerabilities (composer audit) and a scan of its source for malware and web-shell signatures. Each runs once. A malware detection fails the version outright.

Security results
Tool Status Findings Summary
Composer audit Pass 0
Malware scan Pass 0
License
OSL-3.0
Authors

More from elgentos

View vendor
Make it pay

Turn an existing module into recurring revenue.

If you already maintain a Magento 2 module on GitHub or GitLab, listing it on Packagento takes about five minutes. We mirror your tags, handle distribution signing, and route paid licenses through Stripe Connect, so you can keep shipping the way you already do.