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
Let each customer choose how they see your prices — VAT-included or VAT-excluded — and remember their choice across the whole site. This module adds a small switcher to your storefront (radio, toggle, segmented or dropdown style) that flips every price display on the fly: catalog, cart, mini-cart, shipping, order totals. No price recalculation, no second checkout, just a clean visual switch.
It's particularly useful for B2B-leaning B2C stores: professionals want to compare HT prices with their supplier quotes, consumers want TTC for budgeting. Instead of forcing one audience or maintaining two stores, you let visitors pick.
Who it's for
- B2B and "B2B + B2C mixed" merchants who serve both professional and end-customer audiences from the same store
- Belgian / French / Luxembourgish stores where HT vs TTC is a daily reflex for buyers
- Merchants who want to display VAT-excluded prices for catalog browsing but VAT-included at checkout, or vice versa, without rewriting their tax configuration
Key benefits
- Cookie-based, FPC-compatible — the choice is stored in a
wmi_tax_display_modecookie and exposed via HTTP Context, so Varnish/built-in Full Page Cache keeps working without losing the user preference. - Plug-in based price override — intercepts every relevant Magento Tax Config method (catalog price, shipping, cart line items, cart subtotal, sales / order prices, sales / order subtotal) so the toggle works everywhere, not only on product pages.
- Four display styles — radio buttons, toggle, dropdown or segmented control. Pick the one that matches your theme.
- Configurable price labels — optionally show HT/TTC next to each price across the site, with auto-sized labels (configurable ratio relative to price font size), position before/after, custom label text (
HTVA/TVACinstead ofHT/TTCif you prefer). - Visibility rules — show the switcher everywhere, on catalog only, exclude checkout, or restrict to specific layout handles. Optional customer-group and device (desktop/mobile) targeting.
- Theming via CSS variables — primary colour, active text colour, border, background, border-radius, font size, all configurable from admin. No CSS file to edit.
- Secure by design — input validation rejects any mode value other than the configured set; cookies use the
Secureflag on HTTPS; CSS values are whitelist-validated (hex, rgb/rgba, hsl/hsla, CSS variables) rather than regex-stripped.
Compatibility
- Magento 2.4.x / Mage-OS equivalent
- PHP 8.1, 8.2, 8.3
- Requires
wimakeit/module-core3.0 or later - Designed for Luma frontends out of the box; pair with
wimakeit/module-tax-switch-hyvafor Hyvä storefronts - Compatible with Varnish Full Page Cache (uses HTTP Context variation)
Install this module via Composer. Make sure your auth.json is configured with your Wimakeit credentials.
$ 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.
- Version
- v1.3.4
- License
- Annual Subscription
- Support
- 12 months
- Last updated
- Jun 5, 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ä
- Not compatible
- Package
-
wimakeit/module-tax-switch
Compatibility checker
Pick your stack to see if this module fits.
Compatibility 4
Pricing & licensing 4
vendor/wimakeit/ once you composer require the package, so you can read it, audit it, and patch it locally for your own Magento install. You may NOT redistribute it, sublicense it, publish it on a public package registry, or sell it on. One licence = one production domain + one staging/dev domain (see terms for the full EULA). Wimakeit modules are NOT part of Magento's open-source repository on packagist.org — they are distributed exclusively via the private Composer registry packages.wimakeit.be. Installation & updates 6
composer require wimakeit/module-tax-switch:^1.3.2, then bin/magento setup:upgrade, bin/magento setup:di:compile, and finally bin/magento cache:flush. The Installation tab on this page lists every configuration step (ACLs, cron jobs, default values) so a deploy takes minutes, not hours. If you need a hand, Wimakeit offers Magento installation services from our Wallonian office (Presles, between Charleroi and Namur). auth.json: {"http-basic": {"packages.wimakeit.be": {"username": "YOUR-EMAIL", "password": "YOUR-TOKEN"}}}. Step 3: register the repo: composer config repositories.wimakeit composer https://packages.wimakeit.be. Step 4: composer require wimakeit/module-tax-switch:^1.3.2. In CI/CD pipelines, inject COMPOSER_AUTH as a JSON env var instead of committing auth.json. composer require, same module code, same database schema — no fork to maintain, no licence change. composer update is safe within a major. app/design/frontend/{YourVendor}/{theme}/Wimakeit_{Module}/templates/ keeping the same relative path. Blocks, ViewModels and Helpers are overridable via DI preference in your own custom module — declare <preference for="Wimakeit\…\OriginalClass" type="YourVendor\Override\Class" /> in etc/di.xml. Layout XML is extended (preferred) or overridden the standard Magento way. Wimakeit modules never use the final keyword on classes you might reasonably want to override — overriding is a first-class scenario, not a hack. Support & security 3
contact@wimakeit.com with the module name, version, Magento/Mage-OS version and the steps to reproduce. Fixes ship in the next patch release. Wimakeit support is staffed in French, English and Dutch on business days (CET working hours). contact@wimakeit.com with a clear [SECURITY] subject prefix — please include the module name, version and the steps to reproduce. We acknowledge promptly on business days and credit reporters in the Changelog if they wish. Wimakeit is a Belgian SRL (société à responsabilité limitée) bound by Belgian and EU privacy and disclosure law. About Wimakeit 1
Found something not covered by the FAQ?
Report a bug or ask a question — the form is prefilled with this 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.
Found a bug? Tell us about it.
A short form opens in a new tab — the module name and your language are already filled in. Share what you tried, what went wrong, and we will get back to you within one business day.
Report a bug for Tax SwitchNeed help?
Our team is available to assist with integration.