Extra Fee
v1.1.5
Extra Fee
- Updates and support included for 12 months
- License key delivered immediately by email
- 30-day money-back guarantee
- Full documentation included
- Composer-ready installation
Extra Fee
Voeg de toeslagen toe die uw werkelijke logistiek vereist — zonder ze in de productprijs of de verzendkosten te verstoppen. Wimakeit Extra Fee laat u extra fees definiëren die door regels worden gestuurd en als hun eigen totals-regel verschijnen op cart, checkout summary, order, factuur en credit memo. Elke matchende rule produceert precies één duidelijk gelabelde fee-regel, zodat klanten altijd zien wat ze betalen en waarom.
Gebouwd voor merchants waarvan de prijszetting afhangt van hoe goederen worden verpakt en behandeld, dekt de module drie concrete cases out of the box: een vast bedrag wanneer het cart-subtotal onder een drempel blijft, een waarborg / caution per palette of big bag, en een vaste connex-fee getriggerd door een productoptie. Rules worden beheerd vanuit een dedicated admin grid — geen developer nodig om een fee toe te voegen, te bewerken of uit te schakelen.
Voor wie
- B2B en industriële merchants die op palettes of in bulk leveren, waar waarborgen en handlingkosten deel uitmaken van de standaardprijszetting
- Winkels die een minimum-order toeslag willen in plaats van een harde orderblokkering
- Merchants die nodig hebben dat fees correct doorstromen door quote, order, factuur en credit memo voor schone boekhouding
Belangrijkste voordelen
- Rule-driven, één regel per rule — definieer zoveel rules als nodig; elke match voegt zijn eigen gelabelde totals-regel toe op cart, checkout, order, factuur, credit memo.
- Drie fee-types ingebakken — vaste fee wanneer cart-subtotal onder een drempel, waarborg per palette of big bag, en vaste connex-fee gestuurd door een
wmi_fraisconnexesproductoptie. - Beheer via admin grid — creëer, bewerk, activeer, deactiveer, mass-update rules vanuit een dedicated grid. Het edit form is gehardened: form-key CSRF check, mass-assignment whitelist op save, XSS-escaped delete confirm.
- Store-view en customer-group scoping — elke rule kan beperkt worden tot specifieke store views en customer groups via multiselects; leeg laten (of de "All …" sentinel kiezen) = van toepassing overal. Ondersteund door genormaliseerde junction tables (
wimakeit_extrafee_rule_store,wimakeit_extrafee_rule_customer_group) met sargable EXISTS / NOT EXISTS filters at runtime. - Tax-aware — kies of fees belast worden en welke tax class van toepassing is, zodat totals correct blijven per store view.
- Productattribuut-gestuurd — waarborg- en connex-rules lezen dedicated
wmi_*productattributen (automatisch aangemaakt bij install). - Schoon order-lifecycle — fees persisteren bij order placement en stromen door naar facturen, credit memos, PDFs en order emails. De persisterende breakdown is tamper-resistant: negatieve bedragen worden vóór opslag geweigerd.
- Magento 2.4 / Mage-OS native — service-contract Api (
Wimakeit\ExtraFee\Api\RuleRepositoryInterface), PHP 8.1 backedRuleTypeenum, declarative schema met whitelisted kolommen. Geen legacyMagento\Framework\Registry.
Compatibiliteit
- Magento 2.4.x / Mage-OS equivalent
- PHP 8.1, 8.2, 8.3, 8.4
- Werkt met de standaard Luma checkout; voor Hyvä, voeg de companion
wimakeit/module-extra-fee-hyvatoe - Het admin-menu zit onder het Wimakeit-menu geleverd door
wimakeit/module-core
Installeer deze module via Composer. Zorg ervoor dat uw auth.json is geconfigureerd met uw Wimakeit-inloggegevens.
$ composer require wimakeit/module-extra-fee:^1.1.5
$ bin/magento setup:upgrade
$ bin/magento setup:di:compile
Installation notes
The standard composer require + setup:upgrade + setup:di:compile flow applies. The points below cover what's specific to this module.
composer require wimakeit/module-extra-fee
bin/magento setup:upgrade
bin/magento setup:di:compile
bin/magento cache:flush
Requires PHP 8.1+ (tested up to 8.4) and Magento 2.4.x / Mage-OS equivalent.
Companion modules
- For a Hyvä storefront, install
wimakeit/module-extra-fee-hyva, which renders one fee row per rule in the cart, checkout summary, and mini-cart. The Luma checkout is supported out of the box. - The admin menu attaches under the Wimakeit parent menu provided by
wimakeit/module-core.
ACL resources
After installation, two new ACL resources are available under System → Permissions → User Roles, grouped under Wimakeit Extra Fee:
| Resource | Default |
|---|---|
Wimakeit_ExtraFee::rule (manage fee rules in the admin grid) | granted to Administrator role only |
Wimakeit_ExtraFee::config (edit module configuration) | granted to Administrator role only |
Assign them to your back-office roles as needed.
Configuration
The module ships with safe defaults. Go to Stores → Configuration → Wimakeit → Extra Fees only if you want to change them. All settings are available per store view.
General settings
| Setting | Default |
|---|---|
| Enable Module | Yes |
| Apply Tax on Fees | Yes |
| Fee Tax Class | Taxable Goods (tax class ID 2) |
Fee Tax Class is only shown when Apply Tax on Fees is set to Yes.
Fee rules
Fees themselves are managed as rules under Wimakeit → Extra Fees → Manage Rules. Three rule types are available:
- Fixed fee when cart subtotal is below a threshold — a flat surcharge applied while the subtotal stays under the configured amount.
- Caution / deposit (palette, big bag…) — a deposit computed from the
wmi_cautionandwmi_quantite_paletteproduct attributes. - Fixed fee per item matching a
wmi_fraisconnexesoption — a connex fee triggered by a product option.
Each matching rule adds its own labelled totals line. No rules exist after install — create the ones you need.
Each rule carries two scoping multiselects since 1.1.0:
- Store Views — select "All Store Views" (sentinel value
0) to apply everywhere, or pick specific stores. Empty selection is treated as "all" on save. - Customer Groups — select "All Customer Groups" (sentinel
32000=GroupManagement::CUST_GROUP_ALL) to apply to every group, or pick specific groups.
Product attributes (provisioned automatically)
A data patch creates three product attributes used by the caution and connex rules. The patch is idempotent: any attribute that already exists is left untouched.
| Attribute | Type | Purpose |
|---|---|---|
wmi_caution | select | Caution type (palette A, big bag, …) |
wmi_quantite_palette | decimal | Quantity packed per caution unit |
wmi_fraisconnexes | select | Connex-fee option triggering a fixed fee |
All three are scope=global and created with is_filterable=0 to avoid breaking category pages via OpenSearch. They appear on products under a dedicated Wimakeit Extra Fees attribute group.
Storage layout
| Table | Purpose |
|---|---|
wimakeit_extrafee_rule | Rule configuration rows (label, type, JSON params, priority) |
wimakeit_extrafee_rule_store (since 1.1.0) | Rule × Store View scope. Empty junction = applies to every store |
wimakeit_extrafee_rule_customer_group (since 1.1.0) | Rule × Customer Group scope. Empty junction = applies to every group |
wimakeit_extrafee_sales_fee | Per-order snapshot of every fee line applied at submit |
quote / quote_address | Aggregate fee + tax columns (wimakeit_extrafee_*) for total-collector math |
sales_order / sales_order_address / sales_invoice / sales_creditmemo | Same aggregate columns for downstream lifecycle |
The legacy CSV columns wimakeit_extrafee_rule.store_ids and customer_group_ids are kept for rollback and will be dropped in a future release.
1.0.x → 1.1.0+ migration
Existing rules with CSV scope columns are migrated to the new junction tables by a data patch (MigrateRuleStoreAndGroupCsvToJunction) at setup:upgrade time. The patch is idempotent and transactional: it skips rules that already have junction rows and rolls back on error. Sentinel semantics are preserved — store_ids containing 0 and customer_group_ids containing 32000 produce empty junctions (= "applies to all"), which is the same semantics the runtime applied before.
To verify after the upgrade:
-- Each rule should be present with either matching junction rows
-- or an empty junction (= applies to all).
SELECT r.rule_id, r.label, r.store_ids AS legacy_csv,
COALESCE(GROUP_CONCAT(rs.store_id ORDER BY rs.store_id), '— (all stores)') AS junction
FROM wimakeit_extrafee_rule r
LEFT JOIN wimakeit_extrafee_rule_store rs ON rs.rule_id = r.rule_id
GROUP BY r.rule_id, r.label, r.store_ids
ORDER BY r.rule_id;
Totals position
The fee totals line is positioned between subtotal and tax by default (sort order 25). Override under Stores → Configuration → Sales → Sales → Checkout Totals Sort Order.
REST extension attributes
Two extension attributes are exposed on Magento\Quote\Api\Data\TotalSegmentInterface and Magento\Sales\Api\Data\OrderInterface via DI preferences (since 1.0.1):
wimakeit_extrafee_lines— per-rule fee breakdown attached to the totals API segmentwimakeit_extrafee_sales_fees— per-order frozen breakdown attached to the Sales API responses
This makes the per-line detail consumable by REST / GraphQL clients (Hyvä checkout, custom front-ends, BI exports) without any extra plumbing.
- Versie
- v1.1.5
- Ondersteuning
- 12 maanden
- Last updated
- 25 aug. 2026
- Magento
- Magento 2.4.4 Magento 2.4.5 Magento 2.4.6 Magento 2.4.7 Mage-OS 2.0 Mage-OS 2.1
- PHP
- PHP 8.1 PHP 8.2 PHP 8.3
- Hyvä
- Niet compatibel
- Pakket
-
wimakeit/module-extra-fee
Compatibility checker
Pick your stack to see if this module fits.
Categories: Security, Feature, Fix, Perf, Admin, Deps.
[1.1.5] - 2026-06-08
Fix
- Cart / checkout no longer throws
Unknown column 'wimakeit_extrafee_rule.rule_id'. The rule-collection'sEXISTS/NOT EXISTSsubqueries (store and customer-group filters) now reference themain_tablealias, matching how MySQL/MariaDB resolves the outer FROM clause. Affected every page that hits the totals collector.
[1.1.4] - 2026-06-05
Admin
- Internal cleanup of the admin rule grid signature for consistency with the rest of the Wimakeit family. No functional change.
[1.1.3] - 2026-06-05
Admin
- Marketing documentation now ships inside the release tag so the marketplace listing reflects the current feature set.
[1.1.2] - 2026-06-05
Fix
- Editing a fee rule that applied to "All Store Views" or "All Customer Groups" no longer silently wipes the scope on save. The sentinel values now pre-select correctly when re-opening the rule.
[1.1.1] - 2026-06-05
Admin
- New dedicated multiselect sources for Store Views and Customer Groups that expose the "All …" sentinel options so admins can pick and pre-see them in the form.
[1.1.0] - 2026-06-05
Perf
- Rule scope is now stored in dedicated junction tables (
wimakeit_extrafee_rule_store,_customer_group) and queried via sargable EXISTS / NOT EXISTS instead of the legacyFIND_IN_SETCSV scan — the per-collectTotalsrule lookup no longer ignores the index.
Admin
- Existing rules are migrated automatically at
setup:upgradetime (idempotent, transactional). "Applies to all stores" and "Applies to all customer groups" sentinels are preserved.
[1.0.3] - 2026-06-05
Admin
- Internal class names for the Caution and FraisFixe calculators and their dropdown sources anglicised (Deposit, FixedFeePerItem) so the codebase reads consistently. Database values, product attribute codes and rule behaviour are unchanged.
[1.0.2] - 2026-06-05
Admin
- Module exposes a proper Service Contract (
Api\RuleRepositoryInterface) so other Wimakeit and partner modules can extend the rule layer cleanly. TheRuleTypeis now a PHP 8.1 backed enum with full back-compat.
[1.0.1] - 2026-06-05
Security
- Admin Delete Rule button escapes the URL and confirm message — closes an XSS vector through admin-controlled parameters in the inline delete confirm.
- Delete controller explicitly validates the form key on every POST — closes a CSRF surface on the grid's inline delete action.
- Save controller whitelists allowed POST fields — closes a mass-assignment surface where extra keys could land on the model.
- Fee line amounts are clamped to non-negative both at the value-object boundary and again before persistence — protects against tampering of the persisted breakdown JSON between cart and order place.
Fix
- Admin order creation and REST / CLI contexts no longer fail with a session error when the cart totals plugin runs outside the storefront session.
- REST extension attributes for the fee breakdown now serialise correctly thanks to the new DI preferences on the data interfaces.
Perf
- Active-rules lookup is request-scoped cached, eliminating the repeated DB hit on every
collectTotalscall during checkout. - Fee-line persistence on order placement switched from a per-row loop to a single multi-insert.
Admin
- Dropped the deprecated
\\Magento\\Framework\\Registryfrom every Rule controller; the form data flows through theDataProvideronly.
Deps
- All
magento/constraints pinned to versioned ranges (was). PHP range widened to<8.5to certify PHP 8.4 support.
[1.0.0] - 2026-06-03
Feature
- Initial public release. Rule-driven extra fees with three rule types: fixed surcharge below a subtotal threshold, deposit per palette / big bag (caution), and fixed connex fee per matching cart item. Admin grid + form for managing rules (create / edit / enable / disable / mass actions). Tax-aware, scope-aware (store view × customer group). The per-rule breakdown is frozen on order place and surfaces on invoice, credit memo, PDFs and order emails.
Een bug gevonden? Laat het ons weten.
Een kort formulier opent in een nieuw tabblad — de modulenaam en uw taal zijn al ingevuld. Beschrijf wat u probeerde, wat misging, en wij komen binnen één werkdag bij u terug.
Een bug melden voor Extra FeeHulp nodig?
Ons team helpt u graag met de integratie.