Tax Switch Hyva
v1.1.8
Tax Switch Hyva
- Updates and support included for 12 months
- Full documentation included
- Compatible with Hyvä themes
- Composer-ready installation
Tax Switch — Hyvä
The Hyvä-frontend companion of wimakeit/module-tax-switch. If you run the Tax Switch module on a Hyvä storefront, install this one too: it replaces the Luma (RequireJS + jQuery) templates with Alpine.js components and vanilla-JS price labels, while reusing the same admin configuration, the same cookie, and the same ViewModel.
You install this module in addition to the main Tax Switch module — never instead of it. The main module owns the configuration, the plugin layer and the FPC integration; this one owns the Hyvä-compatible rendering.
Who it's for
- Stores running on Hyvä Themes that need a tax display mode switcher (HT/TTC) without dragging RequireJS back into their bundle
- Multi-frontend setups where Luma and Hyvä coexist and need consistent tax-switch behaviour
- Hyvä projects that want the full Tax Switch feature set (visibility rules, styling, price labels, four display styles) without writing their own Alpine.js components
Key benefits
- Alpine.js components, no jQuery — the radio, toggle, segmented and dropdown styles are reimplemented with
x-dataso they fit naturally into a Hyvä bundle. - Vanilla-JS price labels — auto-sizing HT/TTC labels next to prices, with no dependency on RequireJS or
mage/cookies. - Reuses the main module's configuration — all admin settings (visibility, styling, labels, customer groups, devices) live in the main Tax Switch module. Nothing new to learn or configure here.
- Removes the Luma blocks — automatically strips the original RequireJS-based blocks from layout, so Hyvä themes don't load them by mistake.
- CSS variables hook — override the defaults from your Hyvä theme's CSS with a clean set of
--wmi-tax-*variables (gap, bg, radius, font-size, border, active colours).
Compatibility
- Magento 2.4.x / Mage-OS equivalent
- PHP 8.1, 8.2, 8.3
- Requires
wimakeit/module-tax-switch1.0 or later (this module is a frontend addon, not a standalone payment of tax-switching logic) - Requires the official Hyvä Themes base module (
hyva-themes/magento2-theme-module1.0+) - A Hyvä-based storefront theme
Install this module via Composer. Make sure your auth.json is configured with your Wimakeit credentials.
$ composer require wimakeit/module-tax-switch-hyva:^1.1.8
$ 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 Wimakeit dependency
This module is a frontend addon for Hyvä. It cannot work on its own — you must install the main Tax Switch module alongside it:
| Package | Minimum | Role |
|---|---|---|
wimakeit/module-tax-switch | 1.0 | owns the admin config, the plugin layer, the FPC integration and the ViewModel |
wimakeit/module-tax-switch-hyva | this module | replaces the Luma templates with Hyvä-compatible Alpine.js / vanilla-JS components |
Required third-party dependency
| Package | Minimum |
|---|---|
hyva-themes/magento2-theme-module | 1.0 |
Your storefront must run on a Hyvä-based theme. If your store is on Luma, install only the main wimakeit/module-tax-switch and skip this one.
Configuration
There is no admin configuration specific to this module. All settings — enable/disable, default display mode, available modes, display style, visibility, customer groups, device targeting, price labels, styling (CSS variables) — live in the main module under Stores → Configuration → Wimakeit → Tax Switcher.
What this module changes
| Layer | Luma (main module) | Hyvä (this module) |
|---|---|---|
| JS framework | RequireJS + jQuery | Alpine.js + vanilla JS |
| Initialisation | data-mage-init | x-data / inline scripts |
| Cookie handling | mage/cookies | native document.cookie |
| Template namespace | Wimakeit_TaxSwitch:: | Wimakeit_TaxSwitchHyva:: |
The Hyvä module removes the original Luma blocks from the page (so they don't load on a Hyvä storefront) and registers Hyvä-compatible blocks reading the same configuration.
Customisation
To restyle the switcher from your Hyvä theme, override these CSS variables:
:root {
--wmi-tax-gap: 0.75rem;
--wmi-tax-bg: transparent;
--wmi-tax-bg-hover: rgba(0,0,0,.05);
--wmi-tax-radius: 4px;
--wmi-tax-font-size: 0.8125rem;
--wmi-tax-border: #ddd;
--wmi-tax-active-bg: #333;
--wmi-tax-active-color: #fff;
}
To override templates, copy them into your Hyvä theme:
app/design/frontend/<Vendor>/<Theme>/Wimakeit_TaxSwitchHyva/templates/
- Version
- v1.1.8
- 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ä
- Compatible
- Package
-
wimakeit/module-tax-switch-hyva
Compatibility checker
Pick your stack to see if this module fits.
Compatibility 4
Pricing & licensing 4
bin/magento module:disable; uninstall cleanup is automatic via the module's setup patch revert. 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-hyva:^1.1.7, 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-hyva:^1.1.7. 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.1.6] - 2026-05-27
Fix
price-label-init.phtmlno longer dies withUncaught SyntaxError: Unexpected end of input. A<script>substring inside a comment was breaking the host HTML parser; rephrased to avoid the literal tag.
[1.1.5] - 2026-05-27
Fix
- Varnish + HttpOnly
X-Magento-Varyno longer trap users in the wrong tax mode. The toggle now reloads onto a one-shot?_tx=<mode>-<ts>URL so Varnish misses and the backend repopulates the cache under the correct vary hash. A defensive self-heal IIFE runs on every page: if the cookie disagrees with the server-rendered mode and no_txis already in the query string, the page transparently reloads cache-busted. Without these, toggling on one page and navigating to another previously-cached page silently reverted the display. - Ships a
noop.phtmland wires the Luma switcher blocks (wimakeit.taxswitch.header/footer/floating/price.label.init) at it viatemplate="Wimakeit_TaxSwitchHyva::noop.phtml", plus belt-and-braces<remove/>+<referenceBlock remove="true"/>. On some Hyvä stacks (magento2-base-layout-resetinteractions) the Luma block can still slip through and render unstyled at the top ofheader.container; on those installs ship a theme override atapp/design/.../Wimakeit_TaxSwitch/templates/tax-switcher.phtmlthat justreturn;s.
Feature
- HTVA / TVAC label is now actually rendered next to prices. The previous flow only sized labels that nothing else ever injected. The price-label initializer now:
- Decorates Hyvä PDP
.product-info-main .price-container .final-price > .price-wrapperand Wimakeit_PageBuilder slider.wm-pb-product__priceserver-side label at boot, and observes the DOM for late-mounted fragments. - Lets themes register extra selectors via
window.wmiTaxLabelSelectors = ['.my-theme-price', …]before the initializer fires. - Ships a
Magento_Catalog::product/price/amount/default.phtmloverride (wired via layoutsetTemplateonproduct.price.render.default) that injects the active label server-side everywhere the standard\Magento\Framework\Pricing\Render\Amountblock is used — PDP info-price-stock, related/upsell sliders, sidebar widgets. - Skips price nodes that already have a sibling
.wmi-tax-labelso server-side template overrides always win.
Admin
- The price-label initializer (and self-heal) now boots whenever the module is enabled — the
show_price_labeltoggle still gates the actual label injection, but the Varnish self-heal must run on every page to be effective.
[1.1.4] - 2026-05-08
Fix
ifconfiglayout paths realigned with thewimakeit_tax_switchconfig section name (renamed inwimakeit/module-tax-switch1.3.2). Previously the Hyvä switcher block could be rendered while the toggle was disabled on stores that upgraded both modules together.
[1.1.3] - 2026-04-29
Deps
- Certified PHP 8.1 → 8.3 support. Composer
phpconstraint tightened to>=8.1 <8.4.
[1.1.2] - 2026-04-28
Deps
- Direct
wimakeit/module-coredependency removed — pulled in transitively viawimakeit/module-tax-switch. The marketplace bundle scanner resolves it correctly.
[1.1.1] - 2026-04-28
Deps
wimakeit/module-coredependency declared explicitly so the marketplace bundle scanner picks it up. Superseded by 1.1.2.
[1.1.0] - 2026-04-22
Feature
- Aligned with
wimakeit/module-tax-switch1.3.0 — the Both (HT + TTC) display mode is removed. Switcher now offers two modes only: Excluding Tax (HT) and Including Tax (TTC).
Admin
- Added missing French translations (
fr_FR) for the switcher aria-labels and screen-reader descriptions.
[1.0.1] - 2026-04-14
Admin
- Composer/Satis distribution archives now exclude internal files (
.gitlab-ci.yml,.claude/,docs/,.gitattributes).
[1.0.0] - 2026-03-12
Feature
- Initial release of Wimakeit Tax Switch — Hyvä compatibility for Magento 2 / Mage-OS.
- Adds the Hyvä-native frontend bits required to render
wimakeit/module-tax-switchon Hyvä themes: Tailwind classes, Alpine.js switcher component, pre-compiled CSS and thehyva_config_generate_beforeobserver that exposes the active tax-display mode to the Hyvä bundle. - Requires
wimakeit/module-tax-switch≥ 1.0 on the same store.
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 Switch HyvaNeed help?
Our team is available to assist with integration.