Advanced Surcharge/Extra Fee Rule for Magento 2
SKU: MGD-M2XP-CHG-SURCHARGE
12 Months Included Support, with options to extend · 30 Days money-back guarantee
Overview
MagedIn Surcharge/Extra Fee Rule is a powerful Magento 2 extension that provides a flexible system for applying conditional surcharges to orders.
Features
- ✓ No core file modifications required
- ✓ Installed via Composer, no manual file copying
- ✓ Full, un-obfuscated source code — read every line
- ✓ Built to Magento & PSR coding standards
- ✓ 12 months of updates & support included
- ✓ See the Compatibility tab for theme & edition support
Specifications
| Support Period | 12 Months Included Support, with options to extend |
|---|---|
| Refund Period | 30 Days |
| Extension Code | 100% Open Source Code |
| Editions Compatibility | Magento Open Source (Community), Magento Commerce (Enterprise), Magento Commerce Cloud, Magento B2B |
| Versions Compatibility | Magento 2.3.x, Magento 2.4.x |
Compatibility
- Magento Open Source (Community)
- Magento Commerce (Enterprise)
- Magento Commerce Cloud
- Magento B2B
- Magento 2.3.x
- Magento 2.4.x
Installation
- Require the package via Composer using the key you received by email.
- Enable the module with bin/magento module:enable.
- Run setup:upgrade to apply the module's schema and data.
- Flush the cache and you're done - no static content deploy needed on Hyvä.
$ composer require magedin/module-surcharge-rule
$ bin/magento module:enable MagedIn_ModuleName
$ bin/magento setup:upgrade
$ bin/magento cache:flush
Changelog
-
v1.1.0 Jul 2026
[1.1.0] - 2026-07-20
Added
- Surcharge line now appears in the order, invoice, and credit-memo confirmation emails.
- Surcharge is itemised on invoice and credit-memo PDFs and reconciles with the grand total.
- Surcharge renders correctly on print and guest-facing invoice/credit-memo pages, including the correct per-document amount on second and later partial documents.
- Multishipping checkout now allocates each shipping address's surcharge to its own sub-order.
Changed
- Module configuration is now read through
MagedIn\SurchargeRule\Model\ConfigInterface, removing a hidden hard dependency on an unrelated module that could fatal during checkout. - Admin rule controllers are no longer license-gated; the
magedin/module-license-managerdependency has been removed. - The quote-to-order surcharge is now propagated via observers instead of the
sales_convert_quotefieldset mapping, ensuring correct amounts in multishipping.
Fixed
- A surcharge that stopped matching mid-session (quantity change, rule disabled/expired, customer-group change, or the module being disabled) no longer lingers on the quote and silently overcharges the customer; invoices and credit memos now reconcile with the grand total.
- The order now stores the correct surcharge amount (previously saved as 0 while the grand total already included it), so the customer-account order view shows the surcharge line.
- Surcharge amounts are rounded so no fractional cents leak into the grand total.
- The cart no longer crashes for rules saved without a customer-facing label.
- The surcharge totals line shows the rule's label as its title and the amount now right-aligns with the other totals rows.
Security
- Admin controllers and the rule grid now gate on the correct ACL resource, so restricted admin roles are evaluated properly instead of being silently denied.
- Delete and Duplicate admin actions now require a POST request with the admin form key instead of a state-changing GET.
- The new-condition endpoint validates the requested condition type against an allow-list before instantiation, closing an arbitrary-class instantiation vector.
Removed
Api\Data\ConditionInterfaceand theModel\Data\Rule/Model\Data\Conditiondata classes have been removed; theRuleInterfaceDI preference now resolves to the active-recordModel\Rulereturned by the repository.- The
Magento\Sales\Model\Orderextension attributes (magedin_surcharge_amount,base_magedin_surcharge_amount,magedin_surcharge_applied_rule_ids,magedin_surcharge_labels) and the quotemagedin_surcharge_labelsextension attribute have been removed. Integrations reading these viagetExtensionAttributes()(including the REST order API) must migrate to the order's stored surcharge fields.
-
v1.0.0 Apr 2025
Version 1.0.0
Release Date: April 18, 2025
We are excited to introduce the initial release of MagedIn SurchargeRule for Magento 2. This powerful extension provides merchants with the ability to create and apply conditional surcharges to orders based on a wide range of criteria. With its flexible rule system and seamless integration with Magento's checkout process, SurchargeRule empowers store owners to implement sophisticated pricing strategies that address specific business needs.
Features
Rule-Based Surcharge System
- Flexible Conditions Builder: Create complex rules using Magento's familiar conditions interface
- Customer Group Targeting: Apply surcharges to specific customer groups
- Website-Specific Rules: Configure different surcharge rules for each website in multi-store setups
- Date Range Scheduling: Automatically activate and deactivate surcharges based on date ranges
- Rule Prioritization: Control the order of rule application with customizable sort orders
- Rule Stopping: Optionally prevent subsequent rules from processing with "stop further processing" option
Surcharge Calculation
- Multiple Calculation Types:
- Fixed Amount: Add a specific currency amount to qualifying orders
- Percentage Based: Calculate surcharges as a percentage of cart subtotal
- Custom Labels: Define user-friendly labels that appear in cart, checkout, and order documents
- Priority Control: Determine which rules take precedence when multiple rules could apply
Complete Order Lifecycle Integration
- Quote Integration: Properly calculates and displays surcharges in shopping cart
- Checkout Integration: Seamlessly incorporates surcharges in the checkout totals
- Order Management: Surcharges are preserved throughout the order management process
- Invoice Handling: Properly invoices surcharge amounts
- Credit Memo Processing: Correctly handles surcharge refunding through credit memos
Admin Features
- Intuitive Rule Management: Easily create, edit, and manage surcharge rules
- Rule Grid: View all rules with filtering, sorting, and search capabilities
- Mass Actions: Enable, disable, or delete multiple rules simultaneously
- Rule Duplication: Create new rules based on existing ones with one click
- Detailed Rule Form: Comprehensive rule editing interface with all configuration options
Frontend Experience
- Transparent Pricing: Clearly displays surcharges in cart and checkout
- Order History: Shows surcharges in customer order history
- Email Templates: Includes surcharge information in order emails
- Print Documents: Displays surcharges on printed invoices and credit memos
Technical Specifications
- Modern Architecture: Built following Magento 2 best practices and SOLID principles
- Rule Repository Pattern: Clean API for rule data management
- Extensibility: Well-designed extension points for customization
- Service Contracts: Proper interfaces for key service implementations
- Performance Optimized: Efficient code implementation with minimal impact on checkout performance
- Database Structure: Properly designed schema with necessary indexes for optimal performance
- Grid UI Components: Modern admin grids using Magento UI components
- PHP 8 Compatibility: Fully compatible with PHP 7.4, 8.0, and 8.1
Requirements
- Magento Open Source or Commerce: 2.4.0 - 2.4.7-p1
- PHP 7.4, 8.0, or 8.1
- MagedIn Rule module: ^1.0
- MagedIn Framework: ^1.3
Installation
The module can be installed via Composer:
composer require magedin/module-surcharge-rule bin/magento setup:upgrade bin/magento setup:di:compile bin/magento setup:static-content:deployConfiguration
After installation:
- Navigate to Stores > Configuration > MagedIn > Surcharge Rule
- Enable the module in the General section
- Save configuration
- Navigate to Marketing > Surcharge Rules > Manage Rules to create your first rule
Documentation
For detailed information about using and configuring the SurchargeRule module, please refer to the following documents:
- User Guide: Complete documentation for store administrators
- Developer Guide: Technical documentation for developers
- README: Overview and quick start guide
Support
If you encounter any issues or have questions about using SurchargeRule:
- Email: [email protected]
- Documentation: https://docs.magedin.com/surcharge-rule
- Support Portal: https://www.magedin.com/support
---
Future Updates
We are committed to enhancing the SurchargeRule module in future releases. Planned features include:
- Additional calculation types (tiered, product-specific)
- Enhanced reporting features
- Advanced tax handling options
- Integration with other MagedIn modules
- Additional rule conditions
Stay tuned for updates and new releases!
FAQ
Does this work with both Magento Open Source and Adobe Commerce?
See the Compatibility tab above - most extensions support both editions.
What happens after my support period expires?
The extension keeps working. You can renew updates & support separately.
Do you offer refunds?
Yes — a 30-day money-back guarantee if the extension doesn't do what the listing says.
Customer Reviews
We were losing money on small orders that required expensive shipping or special packaging, especially in certain regions. MagedIn’s Advanced Surcharge Rule extension gave us the flexibility we needed to apply conditional fees — by cart value, product type, even customer group. The rule builder feels just like Magento’s native promotions, so setup was intuitive. Best of all, the fees are clearly shown at checkout, so customers aren’t surprised. It’s helped us recover revenue we used to leave on the table.
Write Your Own Review
Only registered users can write reviews. Please Sign in or create an account






