Tax Switch
v1.3.4
Tax Switch
- Updates and support included for 12 months
- License key delivered immediately by email
- 30-day money-back guarantee
- Full documentation included
- Composer-ready installation
Tax Switch
Laat elke klant kiezen hoe hij uw prijzen ziet — inclusief BTW of exclusief BTW — en onthoud zijn keuze op de hele site. Deze module voegt een kleine switcher toe aan uw storefront (radio, toggle, segmented of dropdown stijl) die elke prijsweergave on-the-fly omschakelt: catalogus, winkelmandje, mini-cart, shipping, ordertotalen. Geen herberekening, geen tweede checkout, gewoon een propere visuele wissel.
Het is bijzonder nuttig voor B2B-georiënteerde B2C-winkels: professionals willen HT-prijzen vergelijken met hun leveranciersoffertes, consumenten willen TTC voor hun budget. In plaats van één publiek te forceren of twee winkels te onderhouden, laat u de bezoeker kiezen.
Voor wie
- B2B- en "B2B + B2C-gemengde" handelaars die zowel professionele klanten als eindklanten bedienen vanuit dezelfde winkel
- Belgische / Franse / Luxemburgse winkels waar HT vs TTC een dagelijkse reflex is voor kopers
- Handelaars die HT-prijzen willen tonen tijdens catalog browsing maar TTC bij checkout, of omgekeerd, zonder hun tax-configuratie te moeten herschrijven
Belangrijkste voordelen
- Cookie-based, FPC-compatibel — de keuze wordt opgeslagen in een
wmi_tax_display_modecookie en blootgesteld via HTTP Context, zodat Varnish / ingebouwde Full Page Cache blijven werken zonder de gebruikersvoorkeur te verliezen. - Plugin-based price override — intercepteert elke relevante Magento Tax Config-methode (catalog price, shipping, cart line items, cart subtotal, sales / order prices, sales / order subtotal) zodat de toggle overal werkt, niet alleen op productpagina's.
- Vier display-stijlen — radio buttons, toggle, dropdown of segmented control. Kies wat bij uw theme past.
- Configureerbare prijslabels — toon optioneel HT/TTC naast elke prijs op de site, met auto-sizing labels (configureerbare ratio t.o.v. prijs font-size), positie before/after, custom labeltekst (
HTVA/TVACin plaats vanHT/TTCals u dat verkiest). - Visibility rules — toon de switcher overal, alleen op de catalogus, sluit checkout uit, of beperk tot specifieke layout handles. Optionele targeting op klantengroep en device (desktop/mobile).
- Theming via CSS-variabelen — primaire kleur, active text-color, border, background, border-radius, font size, allemaal configureerbaar vanuit de admin. Geen CSS-bestand om te editeren.
- Veilig ontworpen — input-validatie weert elke mode-waarde buiten de geconfigureerde set; cookies gebruiken de
Secureflag op HTTPS; CSS-waarden worden via whitelist gevalideerd (hex, rgb/rgba, hsl/hsla, CSS-variabelen) in plaats van met regex gestript.
Compatibiliteit
- Magento 2.4.x / Mage-OS equivalent
- PHP 8.1, 8.2, 8.3
- Vereist
wimakeit/module-core3.0 of hoger - Ontworpen voor Luma-frontends out of the box; te combineren met
wimakeit/module-tax-switch-hyvavoor Hyvä-storefronts - Compatibel met Varnish Full Page Cache (gebruikt HTTP Context-variatie)
Installeer deze module via Composer. Zorg ervoor dat uw auth.json is geconfigureerd met uw Wimakeit-inloggegevens.
$ composer require wimakeit/module-tax-switch:^1.3.4
$ 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.
Required dependency
This module requires wimakeit/module-core 3.0 or later. Composer pulls it automatically from the Wimakeit registry as long as the registry is declared in your project's composer.json.
Companion module for Hyvä
If your storefront runs on Hyvä, also install wimakeit/module-tax-switch-hyva. That module replaces the Luma (RequireJS) frontend with Alpine.js / vanilla-JS templates while reusing the same admin configuration and ViewModel.
ACL permission
| Resource | Default |
|---|---|
Wimakeit_TaxSwitch::config (edit Tax Switcher configuration) | granted to Administrator role only |
Configuration
Go to Stores → Configuration → Wimakeit → Tax Switcher. The module is disabled by default so installing it never changes a live frontend until you turn it on.
General
| Setting | Default |
|---|---|
| Enable Tax Switcher | No |
| Default Display Mode | Auto (use the store's native Tax → Price Display config) |
Display Options
| Setting | Default |
|---|---|
| Available Modes | HT, TTC (1,2) |
| Display Style | radio (options: radio, toggle, dropdown, segmented) |
| Position | header |
| Show Labels | Yes |
Visibility Rules
| Setting | Default |
|---|---|
| Page Visibility | all_pages (options: all_pages, catalog_only, exclude_checkout, specific_handles) |
| Excluded Layout Handles | empty |
| Customer Groups | empty (all groups) |
| Device Visibility | all (options: all, desktop, mobile) |
Labels (next to prices)
| Setting | Default |
|---|---|
| Show Tax Label Next to Prices | No |
| Excluding Tax Label | empty (falls back to HT) |
| Including Tax Label | empty (falls back to TTC) |
| Show Currency Symbol | Yes |
| Price Label Position | after |
| Price Label Size Ratio | 0.6 (60% of price font size, range 0.4–1.0) |
Styling (CSS variables)
| Setting | Default |
|---|---|
| Primary / Active Color | #333333 |
| Active Text Color | #ffffff |
| Border Color | #B9B8AF |
| Background Color | transparent |
| Border Radius | 4px |
| Font Size | 0.8125rem |
Override any of these to match your theme without touching CSS files.
Full Page Cache note
The module uses Magento HTTP Context to vary FPC entries by tax display mode. After enabling the module on a live store, flush the FPC once (bin/magento cache:flush full_page) so the new context variation takes effect.
- Versie
- v1.3.4
- Licentie
- Jaarabonnement
- Ondersteuning
- 12 maanden
- Last updated
- 5 jun. 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-tax-switch
Compatibility checker
Pick your stack to see if this module fits.
Compatibiliteit 4
Prijs & licentie 4
composer require in vendor/wimakeit/ terecht; u kan ze lezen, auditen en lokaal patchen voor uw eigen Magento-installatie. U mag de code NIET herverspreiden, sublicentiëren, op een publiek Composer-register publiceren of doorverkopen. Eén licentie = één productiedomein + één staging/dev-domein (zie de algemene voorwaarden voor de volledige EULA). Wimakeit-modules staan NIET op het publieke packagist.org — ze worden uitsluitend verspreid via het private Composer-register packages.wimakeit.be. Installatie & updates 6
composer require wimakeit/module-tax-switch:^1.3.2 uit, daarna bin/magento setup:upgrade, bin/magento setup:di:compile en tot slot bin/magento cache:flush. Het tabblad Installation op deze pagina lijst elke configuratiestap (ACL's, crons, defaultwaarden) — een deploy duurt minuten, geen uren. Hulp nodig? Wimakeit biedt Magento-installatiediensten vanuit ons Waalse kantoor (Presles, tussen Charleroi en Namen). auth.json toe: {"http-basic": {"packages.wimakeit.be": {"username": "UW-E-MAIL", "password": "UW-TOKEN"}}}. Stap 3: registreer het repo: composer config repositories.wimakeit composer https://packages.wimakeit.be. Stap 4: composer require wimakeit/module-tax-switch:^1.3.2. In CI/CD-pipelines injecteert u COMPOSER_AUTH als JSON-environment-variabele in plaats van auth.json te commit'en. composer require, zelfde modulecode, zelfde databaseschema — geen fork om te onderhouden, geen licentiewijziging. composer update blijft veilig binnen een major. app/design/frontend/{UwVendor}/{theme}/Wimakeit_{Module}/templates/ met hetzelfde relatieve pad. Blocks, ViewModels en Helpers worden overschreven via DI-preference in uw eigen custom module — declareer <preference for="Wimakeit\…\OriginalClass" type="UwVendor\Override\Class" /> in etc/di.xml. Layout-XML wordt uitgebreid (voorkeur) of overschreven op de standaard Magento-manier. Wimakeit-modules gebruiken nooit het keyword final op klassen die u redelijkerwijs zou willen override — overschrijven is een first-class scenario, geen hack. Support & beveiliging 3
contact@wimakeit.com met modulenaam, versie, Magento/Mage-OS-versie en reproduceringsstappen. Fixes verschijnen in de volgende patch. Wimakeit-support antwoordt in het Nederlands, Frans en Engels op werkdagen (CET-uren). contact@wimakeit.com met het voorvoegsel [SECURITY] in het onderwerp — vermeld de module, versie en reproductiestappen. Bevestiging op werkdagen, vermelding in het Changelog op verzoek. Wimakeit is een Belgische BV (besloten vennootschap) onderworpen aan Belgisch en Europees recht inzake privacy en responsible disclosure. Over Wimakeit 1
Iets gevonden dat niet in de FAQ staat?
Meld een bug of stel een vraag — het formulier is voor-ingevuld met deze module.
Changelog
Categories: Security, Feature, Fix, Perf, Admin, Deps.
[1.3.2] - 2026-05-08
Admin
- Admin menu group standardized — module appears under a top-level Wimakeit_TaxSwitch entry with a Settings child that opens directly on the configuration section.
- Config section path renamed from
wimakeit_taxswitchtowimakeit_tax_switchfor consistency with the other Wimakeit modules. A data patch migrates existingcore_config_datarows automatically onsetup:upgrade— no manual reconfiguration needed.
[1.3.1] - 2026-04-29
Admin
- Internal release pipeline standardized (validate, tag, deploy, release stages). No functional change for merchants.
Deps
- Certified PHP 8.1 → 8.3 support. Composer
phpconstraint tightened to>=8.1 <8.4.
[1.3.0] - 2026-04-22
Feature
- Simplified switcher to two modes only: Excluding Tax (HT) and Including Tax (TTC). The legacy "Both" (HT + TTC) display mode and its vertical/horizontal layout, templates, JS, CSS and translation keys are removed.
Admin
- Stores that had "Both" selected fall back to the configured default mode after upgrade — review your Stores → Configuration → WiMakeIT → Tax Switch → Default mode setting if you used it.
[1.2.3] - 2026-04-14
Admin
- Composer/Satis distribution archives now exclude internal files (
.gitlab-ci.yml,.claude/,docs/,.gitattributes) — leaner packages for clients.
[1.2.2] - 2026-04-10
Security
- Cookie value is now validated against the admin-configured Available modes before being applied — blocks a business-logic bypass where a crafted cookie could force a display mode the merchant disabled.
- Cookie lifetime reduced from 1 year to 30 days (GDPR proportionality).
- Removed hardcoded
EUR/€fallback — multi-currency stores now read the active currency for the price label suffix.
Perf
TaxConfigPluginmoved from globaldi.xmltofrontend/di.xml— no longer instantiated in admin, CLI or cron requests.- Template position check runs once per page instead of three times (
shouldDisplay()short-circuited earlier). - Duplicate caching removed from
TaxConfigPlugin(the provider already cached upstream).
Admin
- Dead methods, no-op
requirejs-config.jsand ~28 lines of redundant logic removed.
[1.2.1] - 2026-04-07
Admin
- Config readers refactored to use the shared
AbstractConfigbase fromwimakeit/module-core— consistent typed getters (getString,getBool, …) across all Wimakeit modules. - Admin Show Tax Label field now controls visibility of HT/TTC labels, currency and position fields via UI dependencies; field order reorganized for clarity.
Deps
- Depends on
wimakeit/module-corefor shared config and admin-tab abstractions.
[1.2.0] - 2026-03-11
Security
- CSS values are now validated against a whitelist (hex, rgb/rgba, hsl/hsla, CSS variables, numbers with units, named colors) instead of a regex blacklist. Invalid CSS is rejected outright rather than having characters stripped.
Perf
- HttpContextPlugin skips REST (
/rest/) and GraphQL endpoints, which never use Full Page Cache, and skips AJAX requests that use customer sections. - A per-request "processed" flag avoids running the same HTTP Context logic twice.
- TaxConfigPlugin short-circuits with a cached module-enabled check, so disabled installs pay no overhead.
- Frontend MutationObserver now targets specific containers (
.page-wrapper, minicart) instead of the entire<body>, and only reacts to mutations that contain price-related elements.
[1.1.0] - 2026-03-11
Feature
- Optional price label next to every price across the site (HT/TTC, with custom text like
HTVA/TVAC). - Auto-sizing labels: configurable ratio (0.4–1.0) relative to price font size.
- Label position before or after the price; "both" mode with vertical or horizontal layout.
- Admin configuration for all price-label settings.
- MutationObserver-driven label rendering for dynamic content (minicart, AJAX updates).
Admin
- Hides Magento's native tax labels (
.price-label,data-label) when the module is active to avoid duplicates. - Inline JavaScript/CSS extracted from PHTML into separate, cache-friendly
price-label.css/price-label.jsfiles.
[1.0.0] - 2024-03-10
Feature
- Initial release.
- Frontend tax display mode switcher with three modes (HT / TTC / Both).
- Cookie-based user preference, persistent across sessions.
- Full Page Cache compatibility via HTTP Context variation.
- Plugin intercepting Magento Tax Config for catalog prices, shipping, cart prices and subtotals, sales / order prices and subtotals.
- Vanilla JavaScript implementation — no jQuery, no Knockout.
Security
- Input validation on mode values (only 1, 2, 3 accepted).
- Secure cookie flag enforced on HTTPS.
- XSS protection via proper output escaping.
Admin
- French and English translations included (
fr_FR,en_US). - PHP 8.1+ with strict types and readonly properties throughout.
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 Tax SwitchHulp nodig?
Ons team helpt u graag met de integratie.