# liquidlab-agency/magento2-innoship-hyva-checkout

> Hyva Checkout compatibility module for InnoShip (https://innoship.com/)

`composer require liquidlab-agency/magento2-innoship-hyva-checkout`

Canonical URL: https://packagento.com/liquidlab-agency/magento2-innoship-hyva-checkout

## At a glance

- **Vendor**: liquidlab-agency (https://packagento.com/liquidlab-agency.md)
- **Latest version**: 1.2.3 — released 2026-06-25
- **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/liquidlab-agency/magento2-innoship-hyva-checkout 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 liquidlab-agency/magento2-innoship-hyva-checkout:*
   bin/magento setup:upgrade
   bin/magento setup:di:compile
   bin/magento cache:flush
   ```

## What it does

Hyva Checkout compatibility module for InnoShip (https://innoship.com/)

## README

Hyvä Checkout compatibility layer for the **InnoShip_InnoShip** shipping module.

Developed by **[Liquidlab Agency](https://liquidlab.ro/)** — **Romania’s first full-service Hyvä agency** and the first Hyvä partner in Romania.  

---

The upstream `InnoShip_InnoShip` module ships a working Luma checkout integration: a PUDO (pickup-drop-off) point picker built on Knockout/jQuery components and `window.checkoutConfig`. None of that runs inside Hyvä Checkout, which uses Magewire + Alpine.js and does not expose `checkoutConfig` to the frontend.

This module bridges that gap. It replaces InnoShip's checkout-side UI with a **Hyvä-native equivalent** while continuing to use InnoShip's database, shipping carrier, AWB generation, and order-management code unchanged.

This module is an independent, community-developed integration. It is not affiliated with, endorsed by, or developed in partnership with Innoship.

---

### Screenshots

<table>
  <tr>
    <td align="center" width="50%">
      <a href="media/checkout_first_step.png" target="_blank"><img src="media/checkout_first_step.png" width="300" alt="Checkout — InnoShip shipping method, no point selected" /></a><br/>
      <sub>Checkout — locker method (no point selected)</sub>
    </td>
    <td align="center" width="50%">
      <a href="media/checkout_second_step.png" target="_blank"><img src="media/checkout_second_step.png" width="300" alt="PUDO picker modal with map, county/city filters and markers" /></a><br/>
      <sub>Interactive Leaflet map picker</sub>
    </td>
  </tr>
  <tr>
    <td align="center" width="50%">
      <a href="media/customer_account.png" target="_blank"><img src="media/customer_account.png" width="800" alt="Order view — PUDO summary with Google Maps / Waze links" /></a><br/>
      <sub>Customer order view — pickup point summary</sub>
    </td>
    <td align="center" width="50%">
      <a href="media/checkout_third_step.png" target="_blank"><img src="media/checkout_third_step.png" width="300" alt="Selected PUDO point displayed in checkout" /></a><br/>
      <sub>Selected pickup point with “Clear” button</sub>
    </td>
  </tr>
</table>

---

### Video Demo

#### Checkout Flow and Billing Management

<video src="https://github.com/user-attachments/assets/5cc18381-2d02-4b6b-a31b-6d93f9651551" width="800" controls>
  Your browser does not support the video tag.
</video>

The video above demonstrates the checkout flow for a customer without a saved address:
1. The customer selects a shipping method that delivers to a pickup point (locker).
2. The interactive map opens, allowing the customer to choose their preferred PUDO point.
3. **Billing Address Logic:** Since a locker address cannot be used for invoicing, the module automatically unchecks "My billing and shipping address are the same".
4. If the billing address was previously mirrored from the shipping address, the module clears the location fields (street, city, etc.) while preserving the customer's identity (name, email, phone). This ensures the customer is prompted to provide a valid billing address for their invoice.

#### Dynamic Payment Method Updates

<video src="https://github.com/user-attachments/assets/0e1aafee-34ba-41ec-9dc5-d7501c697bed" width="800" controls>
  Your browser does not support the video tag.
</video>

This video shows how payment methods are filtered based on the selected shipping method:
1. Payment methods (such as Cash on Delivery) are restricted according to the carrier's configuration in the admin panel.
2. The payment methods list in Hyvä Checkout refreshes automatically as soon as a shipping method is selected, ensuring the restrictions take effect without a page reload.

---

### What it does

#### 1. PUDO point picker in Hyvä Checkout

When the customer chooses an InnoShip shipping method (e.g. `innoshipcargusgo_*`), Hyvä Checkout renders a **"Choose Pickup Point on Map"** button under the shipping method.

![Checkout — locker shipping method, no point selected yet](media/checkout_first_step.png)

- Clicking it opens a modal with an interactive Leaflet map of available pickup points.
- The modal uses a **two-column layout**: a left sidebar for filters and search, and a right panel for the map.
- The customer can narrow results by **county and city** (county/city lists come from the `innoship_pudo` table).
- After a city is selected, a **search input** appears in the sidebar. It filters all currently loaded pins in real time by name, street address, city, and postcode — entirely client-side, with no Magewire roundtrip per keystroke.
- Search results appear as a dropdown list (capped at 20 matches). Clicking a result pans and zooms the map to that pin and opens its popup, ready for the customer to confirm their choice.
- If no county is selected but the customer's shipping address has a Romanian region, the map auto-centers on that region and shows points within ~50 km, sorted by distance.
- Marker icons reflect the courier (Cargus, DPD, FAN, eMag, Posta Romana, etc.).
- Each marker's popup shows the address, phone number, opening hours, accepted payment methods, and a **"Select This Point"** button.

![Picker modal with county/city filters and pickup-point markers](media/checkout_second_step.png)

The picker is implemented as two Magewire components, `Magewire\PudoPicker` (modal + filters + map data) and `Magewire\PudoPoint` (selected-point summary), wired together via `emit()` / `$listeners`. The map UI itself is an Alpine.js component (`view/frontend/web/js/pudo-picker.js`). The search input uses Hyvä's CSP-safe Alpine binding pattern (`:value` + `@input` instead of `x-model`, which the CSP-friendly Alpine build does not support).


https://github.com/user-attachments/assets/ab9bb712-e995-41bb-8168-59dcf83d6d64


#### 2. Persisted PUDO selection

_(README truncated for .md surface. Full README on https://packagento.com/liquidlab-agency/magento2-innoship-hyva-checkout.)_

## Recent Versions

| Version | Released |
|---|---|
| 1.2.3 | 2026-06-25 |
| 1.2.2 | 2026-05-18 |
| 1.2.1 | 2026-05-17 |
| 1.2.0 | 2026-05-14 |
| 1.1.0 | 2026-05-11 |
| 1.0.0 | 2026-05-06 |

## Dependencies

### Require

| Package | Constraint |
|---|---|
| hyva-themes/magento2-hyva-checkout | ^1.3 |
| magento/framework | >=103.0 |
| magewirephp/magewire | * |
| php | >=8.1 |

## Quality

Latest release (1.2.3) 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 | 1 | 1 | – | – |
| 2.4.8 | – | 1 | 1 | – |
| 2.4.9 | – | – | 1 | 1 |


### 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 | 73 | 1 error, 72 warnings (ruleset: Magento2), 10 auto-fixable with phpcbf |
| PHPMD | Warning | 3 | 3 rule violations (UnusedPrivateField:3) |
| Cpd | Pass | 0 |  |
| Composer validate | Info | 2 | valid; 2 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 | Error | Error | – | – |
| 2.4.8 | – | Error | Error | – |
| 2.4.9 | – | – | Error | Error |


### 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=["liquidlab-agency/magento2-innoship-hyva-checkout"],
  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

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

