hyva-themes / magento2-theme-fallback

hyva-themes/magento2-theme-fallback

Allow for Hyvä Themes to fall back to regular Magento themes on specific routes.

  • Hyvä Themes B.V.
magento2-module Compatibility: 2.4.7-2.4.8 Code Quality: Fail Tests: N/A Security: Pass OSL-3.0

magento2-theme-fallback

Theme fallback for Hyvä Themes.

What does it do?

It allows the use of the luma theme or define another theme path for specific URLs.

Installation for Hyvä license holders

  1. Install via composer
composer require hyva-themes/magento2-theme-fallback
  1. Enable module
bin/magento setup:upgrade

Installation for contributions or technology partners

  1. Install via composer
composer config repositories.hyva-themes/magento2-theme-fallback git [email protected]:hyva-themes/magento2-theme-fallback.git
composer require hyva-themes/magento2-theme-fallback:dev-main
  1. Enable module
bin/magento setup:upgrade

Magento backend configuration

  1. HYVA THEMES->Theme Fallback->General Settings->Enable

    The configuration path is hyva_theme_fallback/general/enable

  2. HYVA THEMES->Theme Fallback->General Settings->Theme full path

    The configuration path is hyva_theme_fallback/general/theme_full_path

    default frontend/Magento/luma

  3. HYVA THEMES->Theme Fallback->General Settings->The list of URL's parts

    The configuration path is hyva_theme_fallback/general/list_part_of_url

Configuration for Hyvä Checkout

Some sites migrate to Hyvä "Checkout first". Use the fallback configuration /hyva_checkout to match any Hyvä Checkout route for this use case.
Be aware that the URL request path in the browser uses /checkout, however, internally the route /hyva_checkout is used.

Using a Hyvä as the fallback theme

Sometimes partial updates are applied to a site, and the Hyvä Theme is configured to be the fallback theme.
In this case ESI route needs to be included in the theme fallback configuration, otherwise there may be issues with the navigation not refreshing correctly.

The route that needs to be added to the configuration is page_cache/block/esi.

How does it work?

There is a before-plugin for all frontend controllers.
The theme fallback is applied when:

  1. Current route/controller/action path matches to configured part.
    • Example: the configured url is customer/account.
      Then for all requests such as ``customer/account/*` the fallback would be applied.
    • Example: the configured url is customer/account/login.
      Only for Login page the fallback would be applied.
  2. The part of the current url matches the configured part.
    • Example: the configured url is demo-product.html.
      All pages with an url containing demo-product.html hold have the fallback.

License

Copyright © 2020-present Hyvä Themes.

Each source file included in this distribution is licensed under OSL 3.0.

http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
Please see LICENSE.txt for the full text of the OSL 3.0 license.

No changelog yet

The vendor hasn't published a changelog. Tagged releases appear in the Versions tab.

Versions
Version Stability QA Status Compatibility Released
1.0.4 stable Fail Magento 2.4.7-2.4.8 Details 2025-11-04 15:59:50
1.0.3 stable Not tested Not yet tested Details 2023-06-01 16:10:20
1.0.2 stable Not tested Not yet tested Details 2022-12-08 07:22:29
1.0.1 stable Not tested Not yet tested Details 2021-06-23 13:43:17
1.0.0 stable Not tested Not yet tested Details 2021-05-27 17:04:15

Requires 1

Package Constraint
magento/framework *

Compatibility

Each Magento release line is installed on its supported PHP versions, then the module is built (DI compilation + static-content deploy) and its unit and integration suites are run. The matrix shows the lines and PHP versions the module is confirmed to install and run on. Code-quality results further down (phpstan, phpcs, …) are reported separately and never affect compatibility.

Compatibility matrix (Magento × PHP)
Magento PHP 8.2 PHP 8.3 PHP 8.4 PHP 8.5
2.4.7 Pass Pass
2.4.8 Pass Pass
2.4.9 Fail unknown Pass

Code Quality

Advisory checks against the module's source. Static analysis runs once across the whole module; PHPStan re-runs per Magento + PHP version because resolvable symbols differ between releases. These NEVER affect the Compatibility badge — a phpcs finding can't make a module incompatible.

Static analysis

Coding standards (phpcs), mess detection (phpmd), copy-pasted code (cpd), PHP cross-version compatibility, composer.json validity. Each runs once for the whole module.

Static analysis results
Tool Status Findings Summary
PHPCS Warning 4 4 warnings (ruleset: Magento2) — 4 auto-fixable with phpcbf
PHPMD Warning 2 2 rule violations (UnusedFormalParameter:1, IfStatementAssignment:1)
Cpd Pass 0
Composer validate Info 1 valid; 1 advisory note (composer validate --strict)

PHPStan

Type-checks the module's PHP against a real Magento install at the configured gate level. Re-runs per Magento and PHP version because resolvable symbols differ between releases. Cell → details modal.

PHPStan results by Magento and PHP version
Magento PHP 8.2 PHP 8.3 PHP 8.4 PHP 8.5
2.4.7 2 2
2.4.8 2 2
2.4.9 2 2

Tests

Unit and integration suites, run for each applicable Magento and PHP version. A test failure speaks to the module's behaviour, not its compatibility with a Magento line, so it is reported here separately and never reddens the compatibility matrix.

Unit tests

Unit tests results by Magento and PHP version
Magento PHP 8.2 PHP 8.3 PHP 8.4 PHP 8.5
2.4.7 N/A N/A
2.4.8 N/A N/A
2.4.9 N/A N/A

Integration tests

Integration tests results by Magento and PHP version
Magento PHP 8.2 PHP 8.3 PHP 8.4 PHP 8.5
2.4.7 N/A N/A
2.4.8 N/A N/A
2.4.9 N/A N/A

Security

Security checks run directly against the module: an audit of its declared dependencies for known vulnerabilities (composer audit) and a scan of its source for malware and web-shell signatures. Each runs once. A malware detection fails the version outright.

Security results
Tool Status Findings Summary
Composer audit Pass 0
Malware scan Pass 0
License
OSL-3.0
Authors

More from hyva-themes

View vendor
Make it pay

Turn an existing module into recurring revenue.

If you already maintain a Magento 2 module on GitHub or GitLab, listing it on Packagento takes about five minutes. We mirror your tags, handle distribution signing, and route paid licenses through Stripe Connect, so you can keep shipping the way you already do.