elgentos / magento2-hyva-checkout-ab-test

elgentos/magento2-hyva-checkout-ab-test

Set up an A/B test with different available Hyvä and Luma checkouts

magento2-module Compatibility: Not yet tested Code Quality: Fail Tests: N/A Security: Pass MIT

elgentos/magento2-hyva-checkout-ab-test

This extension allows you to set up an A/B test with different available Hyvä and the Luma fallback checkout.

You can configure a specific split between multiple checkouts, like the configured Hyva Checkout and the Luma fallback checkout. Or between the Hyva Checkout onepage version and the Hyva Checkout multi-step version.

Installation

composer require elgentos/magento2-hyva-checkout-ab-test
bin/magento set:up

Configuration

You can enable the extension under Stores > Configuration > Hyvä Themes > Checkout > A/B Test.

image

Usage

Checkout Selection

The module determines which checkout to use based on the following priority:

  1. URL Parameter Override (if allowed)

    • In development mode: The active_checkout_namespace URL parameter can always be used to manually select a checkout
    • In production mode: The parameter can only be used if "Allow URL Parameter Override" is enabled in configuration
  2. Developer Mode: If no URL parameter is provided, development mode always uses the default checkout configured in hyva_themes_checkout/general/checkout

  3. Random Assignment: In production mode (without URL override), customers are randomly assigned to configured checkouts based on their percentage split

Manual Checkout Selection via URL

You can manually override the checkout selection by adding the active_checkout_namespace query parameter:

http://store.test/checkout?active_checkout_namespace=hyva
http://store.test/checkout?active_checkout_namespace=luma

In Development Mode: This parameter always works and overrides the default checkout selection.

In Production Mode: This parameter only works if "Allow URL Parameter Override" is enabled under Stores > Configuration > Hyvä Themes > Checkout > A/B Test.

Reports

You can check the progress of the A/B test by running this query;

SET SQL_MODE='';
SELECT quote.active_checkout_namespace as checkout, COUNT(quote.entity_id) as quotes, COUNT(sales_order.quote_id) as orders, (COUNT(sales_order.quote_id) / COUNT(quote.entity_id)*100) as conversion_percentage
FROM quote
         LEFT JOIN sales_order ON quote.entity_id = sales_order.quote_id AND sales_order.state IN ('completed', 'processing')
WHERE quote.active_checkout_namespace IS NOT NULL
GROUP BY quote.active_checkout_namespace;

If you want to see the results in the Magento admin, you can install degdigital/magento2-customreports and add the above query. Be sure to leave out the SQL_MODE part (Magento does this for you) and leave no trailing/leading white lines.

The report will look like this;

image

No changelog yet

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

Versions
Version Stability QA Status Compatibility Released
2.0.3 stable Pass Not yet tested Details 2026-02-27 12:36:14
2.0.2 stable Not tested Not yet tested Details 2026-02-27 10:09:18
2.0.1 stable Not tested Not yet tested Details 2024-12-17 15:06:30
2.0.0 stable Not tested Not yet tested Details 2024-12-17 12:21:29
1.0.5 stable Not tested Not yet tested Details 2022-11-10 14:19:18
1.0.4 stable Not tested Not yet tested Details 2022-11-10 12:03:41
1.0.3 stable Not tested Not yet tested Details 2022-11-10 11:20:30
1.0.2 stable Not tested Not yet tested Details 2022-11-10 10:05:21
1.0.1 stable Not tested Not yet tested Details 2022-11-09 20:24:30
1.0.0 stable Not tested Not yet tested Details 2022-11-09 19:23:37

Requires 3

Package Constraint
php ^8.1
magento/framework *
hyva-themes/magento2-hyva-checkout *

Suggests 1

Package Reason
degdigital/magento2-customreports Useful to check A/B test results in the Magento admin

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 not tested not tested
2.4.8 not tested not tested
2.4.9 not tested not tested

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 6 6 warnings (ruleset: Magento2) — 1 auto-fixable with phpcbf
PHPMD Warning 1 1 rule violation (UnusedFormalParameter:1)
Cpd Pass 0
Composer validate Info 2 valid; 2 advisory notes (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 Error Error
2.4.8 Error Error
2.4.9 Error Error

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 N/A 0 no resolvable dependency tree to audit — Your requirements could not be resolved to an installable set of packages. Problem 1
Malware scan Pass 0
License
MIT

More from elgentos

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.