# berrypath/magento2-berrypath-flow-hyva-compat

> BerryPath guided selling flows for Magento 2 Hyvä storefronts.

`composer require berrypath/magento2-berrypath-flow-hyva-compat`

Canonical URL: https://packagento.com/berrypath/magento2-berrypath-flow-hyva-compat

## At a glance

- **Vendor**: berrypath (https://packagento.com/berrypath.md)
- **Latest version**: 1.0.2 — released 2026-07-21
- **Pricing**: Free
- **Package type**: Magento 2 module
- **Status**: active, accepting new buyers

## Installation

Packagento is licence-gated, so even free packages need a licence on a project before Composer can resolve them.

1. **Sign in or create an account** at https://packagento.com/customer/account/.

2. **Add the package to your account.** Open https://packagento.com/berrypath/magento2-berrypath-flow-hyva-compat and complete the free checkout. A licence is minted automatically.

3. **Create or pick a project, then activate the licence on it.**
   - Projects represent the Magento installs you deploy to. Manage them at https://packagento.com/projects/.
   - Activate the new licence on the project you'll deploy this package to. Activation is what generates the Composer credentials scoped to that project.

4. **Add the project credentials to your Magento codebase.**

   Grab the project's public + private key from https://packagento.com/projects/ (open the project, then its Credentials tab), and add them to `auth.json`:

   ```json
   {
     "http-basic": {
       "packagento.com": {
         "username": "ppk_live_...",
         "password": "psk_live_..."
       }
     }
   }
   ```

   Add the Packagento Composer repository to `composer.json`:

   ```json
   {
     "repositories": [
       { "type": "composer", "url": "https://packagento.com" }
     ]
   }
   ```

5. **Install and apply.**

   ```bash
   composer require berrypath/magento2-berrypath-flow-hyva-compat:*
   bin/magento setup:upgrade
   bin/magento setup:di:compile
   bin/magento cache:flush
   ```

## What it does

BerryPath guided selling flows for Magento 2 Hyvä storefronts.

## README

![BerryPath Guided Selling Flows for Magento 2 Hyvä](docs/banner-1544x500.png)

Bring BerryPath guided selling flows to Magento 2 Hyvä category pages, product pages, and CMS content with responsive, Tailwind-based storefront templates.

This companion package works with [`berrypath/magento2-berrypath-flow`](https://github.com/BerryPath/magento2-berrypath-flow). It uses the same Magento configuration and BerryPath Flow UUIDs; no second integration setup is required.

New to BerryPath? A free plan is available with **1 guided selling flow and up to 2,500 products**. Existing customers keep using their current plan.

- [Start for free](https://app.berrypath.eu/register)
- [Magento setup guide](https://www.berrypath.eu/docs/magento-module)
- [Main Magento module](https://github.com/BerryPath/magento2-berrypath-flow)
- [Live demo](https://www.berrypath.eu/demo/category)

### Built for Magento 2 Hyvä storefronts

- Replaces the standard BerryPath frontend templates through Hyvä's compatibility fallback.
- Supports category, product, and CMS widget placements.
- Supports popup, sidebar, and inline guided selling flows.
- Preserves market, locale, product identifier, and assisted conversion behavior from the main module.
- Uses responsive Tailwind utility classes for banners, buttons, and inline flow containers.
- Keeps the stable `berrypath-flow-widget` CSS classes for integrations and custom styling.

### Requirements

- PHP 8.1 or newer.
- `berrypath/magento2-berrypath-flow`.
- `hyva-themes/magento2-compat-module-fallback`.
- A Magento 2 Hyvä storefront.

Composer installs the main BerryPath module and Hyvä compatibility fallback as package dependencies.

### Installation

```bash
composer require berrypath/magento2-berrypath-flow-hyva-compat
bin/magento module:enable BerryPath_Flow BerryPath_FlowHyvaCompat
bin/magento setup:upgrade
bin/magento cache:flush
```

For local `app/code` development, place the module at:

```text
app/code/BerryPath/FlowHyvaCompat
```

Rebuild the Hyvä theme CSS after installation when the storefront uses a production Tailwind build.

### Configuration

This compatibility package adds no separate admin settings. Configure guided selling flows through the main Magento module:

```text
Store defaults: Stores > Configuration > BerryPath > Flow
Category:       Catalog > Categories > BerryPath Flow
Product:        Catalog > Products > BerryPath Flow
CMS:            Content > Widgets > Add Widget > BerryPath Flow
```

Add the BerryPath Flow UUID or published widget URL to the desired placement. The Hyvä templates automatically use the configured display type, content, locale, market, and product identifier.

### Template compatibility

The module registers this mapping with `Hyva\CompatModuleFallback\Model\CompatModuleRegistry`:

```text
BerryPath_Flow → BerryPath_FlowHyvaCompat
```

Compatible templates are included for:

- `category.phtml`
- `product.phtml`
- `widget.phtml`

Tailwind content sources are declared under `view/frontend/tailwind/` so the module's template classes can be included in a Hyvä CSS build.

### Screenshots

Ask relevant, easy-to-answer questions:

![Guided selling question](docs/screenshots/guided-question.png)

Turn shopper answers into focused product recommendations:

![Guided selling recommendations](docs/screenshots/recommendation-results.png)

Use the same guided selling placements across Magento 2 Hyvä content, category, and product pages:

![Homepage CMS widget](docs/screenshots/homepage-widget.png)

![Category page widget](docs/screenshots/category-widget.png)

![Product page widget](docs/screenshots/product-widget.png)

### License

MIT. See [LICENSE](LICENSE).

## Recent Versions

| Version | Released |
|---|---|
| 1.0.2 | 2026-07-21 |
| 1.0.1 | 2026-07-21 |
| 1.0.0 | 2026-06-13 |

## Dependencies

### Require

| Package | Constraint |
|---|---|
| berrypath/magento2-berrypath-flow | * |
| hyva-themes/magento2-compat-module-fallback | * |
| php | >=8.1 |

## Quality

Latest release (1.0.2) fails the Packagento QA pipeline. Verdicts below are per-cell (Magento line × PHP version) for the matrixed tools, and run-once for the static / security tiers.


### Compatibility

Each Magento line is installed on its supported PHP versions, then the module is built (DI compile + static-content deploy). Cells show passed / failed / untested; staircase gaps render as `–`.

| 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 | – | – | Pass | Pass |


### Code Quality

Advisory checks against the module's source. Never affect the Compatibility verdict — 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.

| Tool | Status | Findings | Summary |
|---|---|---|---|
| PHPCS | Fail | 14 | 2 errors, 12 warnings (ruleset: Magento2) |
| PHPMD | Pass | 0 |  |
| Cpd | Pass | 0 |  |
| Composer validate | Info | 3 | valid; 3 advisory notes (composer validate --strict) |

#### PHPStan

Type-checks the module against a real Magento install. Re-runs per Magento + PHP version because resolvable symbols differ between releases.

| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | 22 | 22 | – | – |
| 2.4.8 | – | 22 | 22 | – |
| 2.4.9 | – | – | 22 | 22 |


### Tests

Unit and integration suites run per Magento + PHP cell. Test failures speak to the module's behaviour, not its compatibility with a line, so they're reported here separately.

#### Unit Tests

| 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

| 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

Dependency-advisory audit (composer audit) plus a source malware scan. A malware detection fails the version outright.

| 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 |  |

## Licence and pricing

Free. A licence is still minted on checkout and bound to your project for Composer access — no payment step.

Refundable within 14 days of first purchase via https://packagento.com/account/refunds/.

## Install via Claude Code or any MCP client

The Packagento MCP server can run the licence + project + Composer steps above in one tool call:

```
purchase_and_install_packages(
  composer_names=["berrypath/magento2-berrypath-flow-hyva-compat"],
  project_id="proj_xxx"
)
```

This handles cart, checkout, licence minting, project activation, and writes auth.json credentials. Connect a client with `claude mcp add packagento https://mcp.packagento.com`. Full setup at https://packagento.com/docs/mcp-setup.

## Vendor

berrypath is a Magento 2 vendor on Packagento. See https://packagento.com/berrypath.md for their full catalogue.

