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ä
De Hyvä-frontend metgezel van wimakeit/module-tax-switch. Als u de Tax Switch module draait op een Hyvä storefront, installeer dan ook deze: hij vervangt de Luma-templates (RequireJS + jQuery) door Alpine.js-componenten en vanilla-JS prijslabels, terwijl hij dezelfde admin-configuratie, dezelfde cookie en hetzelfde ViewModel hergebruikt.
U installeert deze module bovenop de hoofdmodule Tax Switch — nooit in plaats ervan. De hoofdmodule bezit de configuratie, de plugin-laag en de FPC-integratie; deze module bezit de Hyvä-compatibele rendering.
Voor wie
- Winkels op Hyvä Themes die een tax display mode switcher (HT/TTC) nodig hebben zonder RequireJS opnieuw in hun bundle te slepen
- Multi-frontend setups waar Luma en Hyvä naast elkaar bestaan en consistent tax-switch gedrag nodig hebben
- Hyvä-projecten die de volledige Tax Switch-featureset (visibility rules, styling, price labels, vier display-stijlen) willen zonder zelf Alpine.js-componenten te schrijven
Belangrijkste voordelen
- Alpine.js componenten, geen jQuery — de radio-, toggle-, segmented- en dropdown-stijlen zijn herimplementeerd met
x-data, zodat ze natuurlijk in een Hyvä-bundle passen. - Vanilla-JS prijslabels — auto-sizing HT/TTC-labels naast prijzen, zonder afhankelijkheid van RequireJS of
mage/cookies. - Hergebruikt de configuratie van de hoofdmodule — alle admin-instellingen (visibility, styling, labels, klantengroepen, devices) leven in de hoofdmodule Tax Switch. Niets nieuws om hier te leren of configureren.
- Verwijdert de Luma-blokken — strippet automatisch de originele RequireJS-gebaseerde blokken uit het layout, zodat Hyvä-themes ze niet per ongeluk laden.
- CSS-variabelen hook — override de defaults vanuit het CSS van uw Hyvä-theme met een propere set
--wmi-tax-*variabelen (gap, bg, radius, font-size, border, actieve kleuren).
Compatibiliteit
- Magento 2.4.x / Mage-OS equivalent
- PHP 8.1, 8.2, 8.3
- Vereist
wimakeit/module-tax-switch1.0 of hoger (deze module is een frontend-addon, geen standalone tax-switching logica) - Vereist de officiële Hyvä Themes basismodule (
hyva-themes/magento2-theme-module1.0+) - Een storefront-theme gebaseerd op Hyvä
Installeer deze module via Composer. Zorg ervoor dat uw auth.json is geconfigureerd met uw Wimakeit-inloggegevens.
$ 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/
- Versie
- v1.1.8
- Licentie
- Jaarabonnement
- Ondersteuning
- 12 maanden
- Last updated
- 11 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ä
- Compatibel
- Pakket
-
wimakeit/module-tax-switch-hyva
Compatibility checker
Pick your stack to see if this module fits.
Compatibiliteit 4
Prijs & licentie 4
bin/magento module:disable; opruimen gebeurt automatisch via de revert van de setup patch. 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-hyva:^1.1.7 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-hyva:^1.1.7. 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.1.8] - 2026-06-05
Deps
- PHP 8.4 certified — constraint widened to
>=8.1 <8.5.
[1.1.7] - 2026-05-28
Fix
- Stand-alone
<remove>elements rejected by Magento'spage_configuration.xsdremoved from the Hyvä layout XML, so layout merge no longer aborts with an XSD error on stricter validators.
[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.
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 Switch HyvaHulp nodig?
Ons team helpt u graag met de integratie.