# zaius/zaius-magento-2

> The Zaius Engage Connector for Magento 2.

`composer require zaius/zaius-magento-2`

Canonical URL: https://packagento.com/zaius/zaius-magento-2

## At a glance

- **Vendor**: zaius (https://packagento.com/zaius.md)
- **Latest version**: 1.0.8 — released 2024-07-19
- **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/zaius/zaius-magento-2 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 zaius/zaius-magento-2:*
   bin/magento setup:upgrade
   bin/magento setup:di:compile
   bin/magento cache:flush
   ```

## What it does

The Zaius Engage Connector for Magento 2.

## README

Integrate Zaius directly into your Magento instance using the Zaius Magento 2 Connector.

### Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

#### Prerequisites

1. Magento 2 "^2.2.5"
2. PHP 5 >= 5.5.0, PHP 7
3. Composer

### Installing

#### Composer

By far the quickest and easiest way to install and maintain the Zaius connector is to use Composer.

1. Require the Zaius Magento 2 package.
2. Install the Zaius Magento 2 package.
3. Finally, make sure the package is up-to-date.

> *Note for users who have installed previous RC versions*  
>  
> Now that stable releases are available, you may **remove** these previously-required lines from your `<MAGENTO_ROOT>/composer.json` file:  
>  
>  ~~"minimum-stability" "RC",~~  
>  ~~"prefer-stable": true~~  


* Add the required packages.

```bash
composer require zaius/zaius-magento-2
composer install
composer update zaius/*
```

#### Alternative install: ZIP

* Download the Zaius Magento 2 module archive from Git: https://github.com/ZaiusInc/zaius-magento-2/archive/master.zip
* Extract the contents of the ZIP file to <MAGENTO_ROOT>/app/code/Zaius/Engage/<extract_here>.

The Zaius PHP SDK is required, and must be installed separately if you've chosen to install via ZIP archive.

* Add the required packages:

```bash
composer require zaius/zaius-php-sdk:^1.0
composer install
composer update zaius/*
```

### Verify & Enable the Zaius Magento 2 Connector

* To verify that the extension installed properly, run the following command:

```bash
php bin/magento module:status
```

By default, the extension is probably disabled, and you will see output like this:

```bash
List of disabled modules:
Zaius_Engage
```

*  Enable the extension and clear static view files:

```bash
php bin/magento module:enable Zaius_Engage --clear-static-content
```

You should see the following output:

```bash
The following modules have been enabled:
- Zaius_Engage

To make sure that the enabled modules are properly registered, run 'setup:upgrade'.
Cache cleared successfully.
Generated classes cleared successfully. Please run the 'setup:di:compile' command to generate classes.
Generated static view files cleared successfully.
```

* Register the extension:

```bash
php bin/magento setup:upgrade
```

* Recompile your Magento project:

```bash
php bin/magento setup:di:compile
```

* Verify that the extension is enabled:

```bash
php bin/magento module:status
```

You should see output verifying that the extension is no longer disabled:

```bash
List of enabled modules:
Zaius_Engage

List of disabled modules:
None
```

* Clean the cache:

```bash
php bin/magento cache:clean
```

### API Setup

In order to support the coupon code functionality Zaius utilizes, and to enable the Zaius support team to most effectively troubleshoot any issues, we require an API user be created with access to the Zaius APIs.

#### Create an appropriate role

In the Magento admin panel, navigate to System > User Roles (under the "Permissions" heading). 
1. Click "Add New Role". 
2. Enter the name "Zaius API". 
3. Click "Role Resources".
4. Select the "Zaius Engage API" resource.
5. Click "Save Role".

#### Create the API user

Still in the Magento admin panel, navigate to System > All Users (under the "Permissions" heading). 
1. Click "Add New User". 
2. Enter the User Name "zaius_api" 
3. Enter any details you like (Zaius recommends a maintainer's details) for name and email. 
4. Create a new password for the user (and make sure to save this in a secure password manager or similar key store). 
5. Click "User Role".
6. Select the "Zaius API" role you created in the previous section.
7. Click "Save User.

#### Save the API User in Zaius

Navigate to the Zaius integration [(Settings (cogwheel) > Integrations)](https://app.zaius.com/app#/integrations) page, making sure you're editing the Zaius account this Magento store will be integrating with (Test or Prod, for the appropriate brand if relevant).
1. Click the "Magento" card.
2. Select "Magento 2" from the Version dropdown.
3. Enter "zaius_api" as the Username.
4. Enter the password you configured in the previous section.
5. Enter the base Magento API URL, which usually matches your website's root URL.
6. Click Save.

Zaius does not recommend clicking "Start Bulk Import" at this time. Please consult with your Customer Success Manager to coordinate the bulk import process.


#### Configuration

After installing the module and setting up the API user, all configuration is done via Stores >> Configuration >> Zaius >> Engage.

Make sure to set these values:

1. Zaius Engage Status > Enabled
2. Zaius Engage Status > Zaius Tracker ID (Found at [API Management](https://app.zaius.com/app#/api_management))
3. Zaius Engage Status > Zaius Private API Key (Found at [API Management](https://app.zaius.com/app#/api_management))
4. Save your changes before proceeding to the next step.
5. Schema Update > Update Schema


### Configuration Settings

##### Zaius Engage Status

**Enabled**: Enable or disable the Zaius Engage Connector functionality.

**Version**: The currently installed version of the Zaius Engage Connector.

**Composer Installed?**: Checks if Composer is installed. Will *ALWAYS* be installed for Magento 2 projects.

**SDK Installed?**: Checks if the [Zaius PHP SDK](https://github.com/ZaiusInc/zaius-php-sdk) is installed. The SDK is **REQUIRED** by the Zaius Engage Connector, and installed automatically with Composer.

**Zaius Tracker ID**: Configuration field for the Zaius client Tracker ID. Found at [API Management](https://app.zaius.com/app#/api_management) in the Zaius client Account.

_(README truncated for .md surface. Full README on https://packagento.com/zaius/zaius-magento-2.)_

## Recent Versions

| Version | Released |
|---|---|
| 1.0.8 | 2024-07-19 |
| 1.0.5-rc.3 | 2021-01-30 |
| 1.0.5-rc.2 | 2020-11-13 |
| 1.0.7 | 2020-11-10 |
| 1.0.6 | 2020-09-23 |
| 1.0.4 | 2020-08-25 |
| 1.0.5-rc.1 | 2020-06-01 |
| 1.0.3 | 2019-11-22 |
| 1.0.2 | 2019-11-21 |
| 1.0.1 | 2019-11-19 |

Showing 10 of 22 versions. Full release history on https://packagento.com/zaius/zaius-magento-2.

## Dependencies

### Require

| Package | Constraint |
|---|---|
| php | >=5.5 |
| zaius/zaius-php-sdk | ^1.0 |

## Quality

Latest release (1.0.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 | 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 | 354 | 6 errors, 348 warnings (ruleset: Magento2) — 222 auto-fixable with phpcbf |
| PHPMD | Warning | 41 | 41 rule violations (UndefinedVariable:14, UnusedLocalVariable:7, UnusedFormalParameter:6, CyclomaticComplexity:4, NPathComplexity:4) |
| 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 | 129 | 129 | – | – |
| 2.4.8 | – | 130 | 132 | – |
| 2.4.9 | – | – | 131 | 131 |


### 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=["zaius/zaius-magento-2"],
  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

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

