# emartech/emarsys-magento2-extension

> Magento2 integration for the Emarsys Marketing Platform

`composer require emartech/emarsys-magento2-extension`

Canonical URL: https://packagento.com/emartech/emarsys-magento2-extension

## At a glance

- **Vendor**: emartech (https://packagento.com/emartech.md)
- **Latest version**: 2.0.18 — released 2026-05-04
- **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/emartech/emarsys-magento2-extension 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 emartech/emarsys-magento2-extension:*
   bin/magento setup:upgrade
   bin/magento setup:di:compile
   bin/magento cache:flush
   ```

## What it does

Magento2 integration for the Emarsys Marketing Platform

## README

For development environment information refer to [dev README](dev/README.md).


## Magento2 integration for the Emarsys Marketing Platform installation guide

1. ### Composer install the package
    ```
    $ composer require emartech/emarsys-magento2-extension
    ```
1.  ### Run Magento setup to install the module
    ```
    $ bin/magento setup:upgrade
    ```
1. ### Get your connect token
   The connect token contains a token for Magento webapi and your current hostname, so that we can send requests to your instance.

   To get your token, navigate to **Stores > Configuration** page in your Magento admin, expand the **Emarsys** panel on the left side and click **Connect**. Your token will be displayed in a textarea, copy that string.

1.  ### Connect your Emarsys account
    Navigate to Emarsys Suite, from the top menu choose **Add-ons** and click the **Magento 2** menu item.

    On the settings page click **Connect**, paste your connect token and click the **Connect** button.

    Next, you have to click the **Stores** button. Your store and website data will be loaded, so first choose the Magento website you want to connect with your Emarsys account. A list of the stores on the website will be populated, choose any of the stores you want to connect. You may change the **Slug** field for something meaningful for you (please keep the slug format, no spaces, special characters, etc). Click the **Connect** button.

1.  ### Turn on the features
    Now you can start turning on the provided features. Note that some features and depending on each other, so for example you will not be able to turn on **Orders** until the initial **Customers** upload is finished.

    Also note, that if your store does not use the Magento provided frontend, the **Web behavior tracking** feature will not work. You will have to implement tracking as described [here](https://help.emarsys.com/hc/en-us/articles/360005884393-tracking-code-Web-Extend).

## Changelog

Release notes:
==============

2.0.18 (2026-04-14)
-------
* Fix
    * Product Sync field mapping - make 'qty' field selectable

2.0.17 (2026-03-12)
-------
* Fix
  * Security update of test dependencies to the latest available packages

2.0.16 (2025-12-03)
-------
* Fix
    * Security update of test dependencies to the latest available packages
    * Web behavior commands cart and purchase price handling
    * Avoid order duplication during order sync

2.0.15
-------
* New
  * Orders filtering & Refund polling based on timestamps 

2.0.14
-------
* Fix
  * Fixing email trigger, if not default template has been choosen for guests orders not triggered

2.0.13
-------
* Fix
  * Fixing email trigger, if not default template has been selected

2.0.12
-------
* Fix
  * Fixing error during installation on Magento Cloud


2.0.11
-------
* Fix
  * Fixing type conversion for PHP 8.1.

## Recent Versions

| Version | Released |
|---|---|
| 2.0.18 | 2026-05-04 |
| 2.0.15 | 2025-07-17 |
| 2.0.14 | 2024-11-19 |
| 2.0.13 | 2024-08-05 |
| 2.0.12 | 2023-11-23 |
| 2.0.11 | 2023-11-16 |
| 2.0.10 | 2023-11-14 |
| 2.0.9 | 2023-07-17 |
| 2.0.8 | 2023-07-17 |
| 2.0.7 | 2023-04-12 |

Showing 10 of 64 versions. Full release history on https://packagento.com/emartech/emarsys-magento2-extension.

## Dependencies

### Require

| Package | Constraint |
|---|---|
| php | >7.0.1 |

### Require (dev)

| Package | Constraint |
|---|---|
| roave/security-advisories | dev-master |

## Quality

Latest release (2.0.18) 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 | 22 | 17 errors, 5 warnings (ruleset: Magento2) — 4 auto-fixable with phpcbf |
| PHPMD | Warning | 34 | 34 rule violations (IfStatementAssignment:6, UnusedFormalParameter:5, UnusedLocalVariable:5, UndefinedVariable:4, ExcessiveClassComplexity:3) |
| Cpd | Pass | 0 |  |
| Composer validate | Info | 1 | valid; 1 advisory note (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 | 82 | 82 | – | – |
| 2.4.8 | – | 82 | 82 | – |
| 2.4.9 | – | – | 82 | 82 |


### 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 | Pass | 0 |  |
| 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=["emartech/emarsys-magento2-extension"],
  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

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

