# sailthru/sailthru-magento2-extension

> Sailthru Module for Magento

`composer require sailthru/sailthru-magento2-extension`

Canonical URL: https://packagento.com/sailthru/sailthru-magento2-extension

## At a glance

- **Vendor**: sailthru (https://packagento.com/sailthru.md)
- **Latest version**: 2.5.8 — released 2026-03-16
- **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/sailthru/sailthru-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 sailthru/sailthru-magento2-extension:*
   bin/magento setup:upgrade
   bin/magento setup:di:compile
   bin/magento cache:flush
   ```

## What it does

Sailthru Module for Magento

## README

###### Sailthru Magento 2 Extension
----------------------

### Installation Instructions

1. Get the module via composer  `composer require sailthru/sailthru-magento2-extension`
2. Enable the module `bin/magento module:enable Sailthru_MageSail`
3. Upgrade the database `bin/magento setup:upgrade` *(Depending on Magento mode, you may need to run `magento setup:di:compile`)*
4. Go to Magento Admin > Stores > Configuration > Sailthru to configure. Visit the [Sailthru Documentation Site](https://getstarted.sailthru.com/integrations/magento/magento-2-extension/) for setup documentation.

*__Note__: If sync'ing variant products with no visible individual URL, you should enable "Preserve Fragments" in Sailthru [here][2].*

### Javascript Setup
The Sailthru MageSail module comes ready to use Sailthru's new PersonalizeJs javascript. To add page-tracking and gather onsite data like pageviews and clicks: 

1. Add your Customer ID (found [here][4]) to vendor/sailthru/sailthru-magento2-extension/view/frontend/web/spm.js 

**Please contact Sailthru to learn more about and enable Site Personalization Manager.**

### To define transactional template to be overriden by Sailthru

Declare new transactional email template in `./etc/template_config.xml` file that can be created within any module.
Each template definition in `./etc/template_config.xml` has four required parameters that are defined in `./etc/template_list.xsd` file.
Required parameters are:
1. id - transactional email template identifier in Magento 2
2. name - template title which will be displayed in `Admin Panel -> Stores -> Configuration -> Sailthru -> Transactionals -> General Transactionals` dropdown list
3. custom_template_source - `Core Config Path` to native Magento 2 transactional email template ID value. Is utilized when custom email template overrides default Magento 2 email template
4. sort_order - template sort order


After updating the `./etc/template_config.xml` file run `php bin/magento cache:clean config` to clean Config cache.
To extend or change structure of a transactional email templates override config file use `./etc/template_list.xsd` file.

### Use Magento Email Queue

Sailthru Magento 2 extension utilizes standard Magento queueing functionality. 

1. Go to *Admin > Stores > Configuration > Sailthru > Messaging > Advanced*
2. Set flag "Use Magento Email Queue" to Yes and save configuration
3. Make sure Magento cron is setup and running
4. To test Sailthru messages queue consumer execute:
```
$ php bin/magento queue:consumers:start sailthru.email.send.consumer.db
OR
$ php bin/magento queue:consumers:start sailthru.email.send.consumer.amqp
```

#### RabbitMQ integration
Instead of standard database based queue broker RabbitMQ can be used

Refer to [Magento Guide: RabittMQ Setup](https://devdocs.magento.com/guides/v2.3/install-gde/prereq/install-rabbitmq.html)

[1]: https://getstarted.sailthru.com/integrations/overview/
[2]: https://my.sailthru.com/settings/spider
[3]: https://my.sailthru.com/settings/domains
[4]: https://my.sailthru.com/settings/api_postbacks

## Recent Versions

| Version | Released |
|---|---|
| 2.5.8 | 2026-03-16 |
| 2.5.4 | 2024-11-15 |
| 2.5.3 | 2024-09-19 |
| 2.5.2 | 2024-09-13 |
| 2.5.1 | 2024-08-16 |
| 2.5.0 | 2024-08-14 |
| 2.4.4 | 2024-08-05 |
| 2.4.2 | 2024-05-06 |
| 2.4.1 | 2023-10-25 |
| 2.4.0 | 2023-01-12 |

Showing 10 of 36 versions. Full release history on https://packagento.com/sailthru/sailthru-magento2-extension.

## Dependencies

### Require

| Package | Constraint |
|---|---|
| magento/framework | ^102.0 \|\| ^103.0 |
| php | ~5.6.0\|~7.0.0\|~7.1.3\|~7.2.0\|~7.3.0\|~7.4.0\|~8.0 |
| sailthru/sailthru-php5-client | 1.2.4 |

### Suggest

| Package | Constraint |
|---|---|
| magento/module-catalog | ^101.* |
| magento/module-customer | ^100.1.* |
| magento/module-newsletter | ^101.* |

## Quality

Latest release (2.5.8) 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 | 1 | – |
| 2.4.9 | – | – | not tested | not tested |


### 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 | 336 | 29 errors, 307 warnings (ruleset: Magento2) — 117 auto-fixable with phpcbf |
| PHPMD | Warning | 66 | 66 rule violations (IfStatementAssignment:20, UnusedFormalParameter:13, UnusedLocalVariable:8, MissingImport:8, CyclomaticComplexity:6) |
| Cpd | Pass | 0 |  |
| Composer validate | Warning | 3 | valid with 3 warnings (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 | 129 | 129 | – | – |
| 2.4.8 | – | 124 | 133 | – |
| 2.4.9 | – | – | 134 | 134 |


### 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=["sailthru/sailthru-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

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

