Tax Display Switcher: setup and help

Quick start

  1. Install the ZIP in Modules > Module Manager and click Configure.
  2. In General Settings, keep Enable Tax Switcher set to Yes and select Widget Style.
  3. Choose Default Display, review Cookie Expiry (days) and Show Price Suffix, then save.
  4. Open the storefront and confirm a supported navigation hook renders the switcher.
  5. Switch modes and confirm product prices change and a non-default mpr_tax_display cookie is stored.
  6. Navigate to another product, test cart and checkout, then return to the default and confirm the preference cookie is removed.

Requires PrestaShop 1.6 or later and PHP 7.1 or later.

Setup manual

Install and open configuration

Upload the ZIP in Modules > Module Manager > Upload a module. Install it and click Configure. Use the module's Settings > Configuration screen, headed General Settings.

Requires PrestaShop 1.6 or later and PHP 7.1 or later.

In multishop, select the context you want to configure. Settings resolve from shop to shop group to global scope.

Configure General Settings

Setting Default What it does and when to change it
Enable Tax Switcher Yes Enable the storefront control and request-level price-display selection. Set No to stop both.
Widget Style Toggle switch Choose Toggle switch, Button pair, or Dropdown. Stored values are toggle, buttons, and dropdown.
Default Display Follow customer group (default) Use the customer's native default-group display method. Choose Tax included or Tax excluded to set a fixed default.
Cookie Expiry (days) 90 Remember a non-default selection for this many days. Values below 1 fall back to 90 in the front script.
Show Price Suffix Yes Append the active-language tax suffix to supported visible price nodes on initial display, after price updates and when switching modes. Set No to omit the module's suffixes.

Click Save. There is no separate placement selector in this form.

For a customer group that should normally browse tax-excluded prices, configure that group's price display method in PrestaShop and keep Default Display set to Follow customer group (default). The native values are 0 for tax included and 1 for tax excluded.

Review labels and suffix defaults

The module stores multilingual keys LABEL_INCL, LABEL_EXCL, SUFFIX_INCL, and SUFFIX_EXCL. These are not four editable fields in the current General Settings form.

Installation seeds labels by language. English values are Incl. VAT, Excl. VAT, incl. VAT, and excl. VAT. German uses inkl. MwSt. and zzgl. MwSt.. French uses TTC and HT. Polish uses brutto and netto. Italian uses IVA incl. and IVA escl.. Spanish uses con IVA and sin IVA. Other language codes use the English fallback at installation.

If you need custom wording, adapt the theme's widget template or arrange a controlled configuration change. Do not look for label fields that this form does not expose. Compact toggle labels and help text also use module translations.

Place the switcher in your theme

On PrestaShop 1.7 and later, the widget can render in displayNav1 or displayNav2. It renders once, in the first applicable call. On PrestaShop 1.6, it can also use displayTop.

If the hook is missing from a custom header, add the appropriate native call at the desired position:

{hook h='displayNav2'}

For a PrestaShop 1.6 header:

{hook h='displayTop'}

The module does not render through displayTop on 1.7 and later. If another supported navigation hook already ran, the once-only guard can prevent a second copy at your new position. Check actual hook order when moving it.

For custom markup, copy the module template into your theme and edit the copy:

/themes/your_theme/modules/mprtaxdisplayswitcher/views/templates/hook/switcher.tpl

The toggle style includes a help control. Tooltip behavior uses the theme's available Bootstrap tooltip integration.

Understand price switching

The front script saves the preference directly in the public mpr_tax_display cookie before updating prices. It does not call a switch AJAX endpoint in this revision.

A non-default choice stores:

mpr_tax_display=0
mpr_tax_display=1

Returning to the configured default removes the cookie. The cookie uses path /, SameSite Lax, and Secure on HTTPS. A later request reads the preference before price display is prepared. It changes the request's cached group display method without updating the stored group record.

The module supplies hidden price data through displayProductPriceBlock only for hook calls with type="weight". It prepares sale and regular prices in both modes and formats them in the active currency. For example:

<span class="mpr-tax-prices"
      style="display:none"
      data-si="120.00"
      data-se="100.00"
      data-ri="150.00"
      data-re="125.00"
      data-d="1"></span>

These attributes contain formatted strings in real output. JavaScript uses compatible product and listing markup to replace visible prices.

Changes are instant when all detected visible prices have matching .mpr-tax-prices data. If data is absent, a price cannot be matched or coverage is incomplete, the script saves the preference and reloads the page so the server renders the chosen mode. Cart and checkout pages reload even when product recommendations contain price data.

The module controls price presentation. Tax rules, stored product prices, actual tax liability, and order accounting still use the shop's tax and checkout configuration. For display data where native inclusive and exclusive values are equal while tax is enabled, the module can calculate an inclusive display fallback from the default-country tax rate. Test that case separately for customer-address and VAT-sensitive shops.

Verify the storefront

Open an uncached storefront page without a saved preference. Confirm it uses Default Display. Switch modes and inspect both the visible price and mpr_tax_display in browser storage.

Navigate immediately to another product. Confirm the chosen mode persists. Switch back to the configured default and confirm the cookie disappears.

Test a product listing, a simple product, a product with combinations, and discounted regular/sale prices. Change the currency and repeat. Test cart and checkout separately, comparing display with the actual totals and tax lines. Inspect custom layouts where hidden price spans are absent or only some nodes update.

For a read-only check of native group display data, use your actual table prefix and language ID:

SELECT g.id_group, gl.name, g.price_display_method
FROM ps_group AS g
INNER JOIN ps_group_lang AS gl ON gl.id_group = g.id_group
WHERE gl.id_lang = 1;

Adjust styling and troubleshoot

Use the module's classes and CSS variables in your theme stylesheet. For example:

:root {
  --mpr-primary: #1f7a5c;
  --mpr-border: #d6d6d6;
  --mpr-text: #222;
  --mpr-text-muted: #777;
}
.mprtaxswitch-host { margin-left: 12px; }
.mprtaxswitch__btn { text-transform: uppercase; }
.mprtaxswitch-tooltip .tooltip-inner { max-width: 320px; }

If the control is missing, check Enable Tax Switcher, theme hooks, once-only rendering, and front asset loading. Use the module's Integrity screen for infrastructure checks.

If prices remain unchanged, inspect .mpr-tax-prices and the theme's displayProductPriceBlock call with type weight. Check browser script errors and whether the markup matches the script's price containers.

If a reload restores the wrong mode, inspect cookie permissions, scope, and the page cache. Test without a cached HTML response. If suffixes are absent, check Show Price Suffix, the suffix values, browser script errors and the theme's price markup.

The preference is saved in the browser cookie. There is no separate switching URL at /module/mprtaxdisplayswitcher/switch or /ajax.

Disable or uninstall

Set Enable Tax Switcher to No to stop the widget and override while retaining settings. Uninstall through Module Manager to remove the menu and module configuration.

Uninstall leaves existing visitor preference cookies in their browsers. You can clear mpr_tax_display in the browser when checking default behavior. Remove any theme template customizations separately.

Questions

1

Can I use the switcher with a full-page cache?

The switcher saves a non-default choice in the public mpr_tax_display cookie and reads it when PHP prepares prices. Your page-cache rules must account for that preference when serving server-rendered prices. Instant JavaScript updates depend on compatible price markup, so check both modes on cached product, cart and checkout pages with your own cache setup.

Known Issues

9

Tax labels lost their localized wording

ResolvedUpdated:
Fixed in: 1.1.8
Switching tax display could replace theme-provided localized price labels incorrectly.

Tax display choice was lost on the next page

ResolvedUpdated:
Fixed in: 1.1.8
Navigating immediately after changing tax display could open the next page with the previous choice.

Tax settings leaked between shop contexts

ResolvedUpdated:
Fixed in: 1.1.8
Tax display settings and translated text did not consistently respect the selected shop and inherited settings.

Switcher could not load on PHP 7.1

ResolvedUpdated:
Fixed in: 1.1.8
The tax switcher could fail to run on PHP 7.1.

Switcher translations remained in English

ResolvedUpdated:
Fixed in: 1.1.8
Translated tax switcher administration text could remain in English.

Clicking the tax switcher scrolled the page

ResolvedUpdated:
Fixed in: 1.1.0
Using the header tax switcher could unexpectedly move the page scroll position.

Switcher failed on newer PHP versions

ResolvedUpdated:
Fixed in: 1.1.0
The tax switcher could fail when reading required settings on PHP 8.1 or newer.

Displayed prices did not update reliably

ResolvedUpdated:
Fixed in: 1.0.11
Changing the tax mode could leave stale prices or fail to update prices on some themes.

Security hardening

ResolvedUpdated:
Fixed in: 1.0.11
Security hardening.

Feature Requests

5

Implemented

Tax display choice

Implemented
Let visitors choose whether shop prices are displayed with or without tax.

Immediate price switching

Implemented
Update supported prices immediately when the visitor changes the tax display choice.

One-click updates

Implemented
Update the module from its administration page.

Multilingual switcher text

Implemented
Use switcher and administration text in French, German, Spanish, Italian and Polish.

Stable switcher label

Implemented
Show the current tax display state in a fixed-width label to avoid layout movement.

Changelog

v1.1.02026-07-26

  • AddedPS 9 / Hummingbird theme compatibility
  • Addedsticky header placement option alongside existing inline positions
  • Improvedtoggle state persistence — remembers preference across sessions via cookie
  • Fixedprice not updating on quick-add-to-cart when switcher toggled on listing page
Older releases

v1.0.112026-07-03

  • Addedcomplete FR/DE/ES/IT/PL translations
  • ImprovedCache tax display switcher state
  • FixedRender tax switcher without core override
  • FixedHarden tax switcher front endpoints
  • FixedReplace Tools::displayPrice with PriceFormatter compat wrapper

v1.2.02026-04-20

  • AddedLicense management tab with key management and renewal options
  • Addedself-healing integrity checks for automatic diagnostics and repair
  • Addedcomplete FR/DE/ES/IT/PL translations

v1.0.02025-02-14

  • Initialrelease: tax-inclusive / tax-exclusive price toggle for PrestaShop
  • InitialB2B/B2C default mode configuration per customer group
  • InitialPer-visitor override — toggle state stored in session
  • InitialCompatible with PS 1.7.x and PS 8.x

Demo

Test the full module before you buy

Buy a licence later and keep your settings.

  • Your 30-day demo Test it on your own shop for 30 days from the first install.
  • Ready demo shop Explore a ready demo shop in your browser.
  • No registration No account, email or store domain needed.
Launch demo shop

By downloading, you accept the demo terms and privacy policy.

By opening this demo you accept the demo terms and the privacy policy.

Loading...
Back to top