mageprince / module-extrafee

mageprince/module-extrafee

Magento 2 Add Extra Fee To Order

  • Mageprince
magento2-module Compatibility: 2.4.7-2.4.8 Code Quality: Fail Tests: N/A Security: Pass GPL-3.0-or-later

Magento 2 Extra Fee

The Extra Fee extension enables store admins to add additional charge to customer order. It allows the creation of unlimited rules based on flexible conditions, ensuring that extra fee are applied only when specific criteria are met.

⚠️ Note: This extension supports only a single extra fee. If you need to apply multiple extra fees based on flexible rules and conditions, check out the Mageprince Extra Fee Pro extension.

✅ Compatibility

Magento Open Source: 2.3.x - 2.4.x
Adobe Commerce (on-prem): 2.3.x - 2.4.x
Adobe Commerce (cloud): 2.3.x - 2.4.x

✨ Key Features

  • Enable or disable the extension from admin configuration
  • Apply extra fees based on specific store views and customer groups
  • Option to enable or disable refunds for extra fees
  • Apply extra fees during admin order creation
  • Fully supports multi-currency and multi-store environments
  • Supports tax calculation on extra fees with configurable tax class selection
  • Choose how to display extra fees: Inclusive, Exclusive, or Both tax formats
  • Define sort order for displaying multiple extra fees
  • Create flexible conditions using cart and product attributes
  • Assign extra fees to specific shipping methods
  • Define rules based on postcode, region, state, or country
  • Apply fees to specific products, categories, or product attributes
  • Display extra fees in order summaries, invoices, credit memos, sales emails, and PDFs

🚀 Installation Instructions

1. Install via composer (Recommended)

Run the following Magento CLI commands:

composer require mageprince/magento2-extrafee
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy

2. Manual Installation

Copy the content of the repo to the Magento 2 app/code/Mageprince/Extrafee

Run the following Magento CLI commands:

php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy

🤝 Contribution

Want to contribute to this extension? The quickest way is to open a pull request on GitHub.

🛠 Support

If you encounter any problems or bugs, please open an issue on GitHub.

📸 Screenshots

1_checkout
2_configuration_general
3_configuration_fee
4_configuration_tax
5_menu
6_conditions
7_condition_cart_attribute
8_condition_product_attributes
9_condition_product
10_condition_category

No changelog yet

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

Versions
Version Stability QA Status Compatibility Released
3.0.1 stable Fail Magento 2.4.7-2.4.8 Details 2025-08-19 06:29:07
3.0.0 stable Not tested Not yet tested Details 2025-05-24 14:02:21

No dependencies declared

This package's composer.json doesn't declare any required, suggested, replaced, or conflicting packages.

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 Pass
2.4.9 not tested Pass

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 Pass 0
PHPMD Warning 6 6 rule violations (UnusedFormalParameter:6)
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 17 17
2.4.8 17 17
2.4.9 Unknown 17

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
GPL-3.0-or-later
Homepage
https://github.com/mageprince/magento2-extrafee
Authors

More from mageprince

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.