# webshopapps/module-matrixrate

> Magento Shipping Multiple Table Rates - MatrixRate

`composer require webshopapps/module-matrixrate`

Canonical URL: https://packagento.com/webshopapps/module-matrixrate

## At a glance

- **Vendor**: webshopapps (https://packagento.com/webshopapps.md)
- **Latest version**: 20.5.2 — released 2026-05-29
- **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/webshopapps/module-matrixrate 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 webshopapps/module-matrixrate:*
   bin/magento setup:upgrade
   bin/magento setup:di:compile
   bin/magento cache:flush
   ```

## What it does

Magento Shipping Multiple Table Rates - MatrixRate

## README

The MatrixRate shipping extension is the original Magento solution developed by [ShipperHQ](https://shipperhq.com) that enables you to offer multiple shipping options to customers based on their location. MatrixRate will enable you to define different shipping rates according to destination, shipping method and the weight, price or quantity of an item.

For businesses seeking even greater shipping customization and real-time carrier integrations, consider upgrading to [ShipperHQ](https://shipperhq.com).

---

### Features

- **Custom Shipping Rates**: Define rates based on destination and weight **or** price **or** quantity. For advanced features like multi-origin shipping and in-store pickup, check out [ShipperHQ](https://shipperhq.com).
- **Based on Magento Tablerate**: MatrixRate is built on the Magento Tablerate module, providing a familiar interface for Magento users.
- **Flexible Configuration**: Set up multiple shipping methods and rules to accommodate different scenarios. [ShipperHQ](https://shipperhq.com) expands on this by offering advanced packaging algorithms and delivery date options.
- **CSV-Based Rules**: Use a straightforward CSV file to upload and manage shipping rules.
- **Localized Shipping Options**: Tailor rates and methods to specific regions, countries, or postal codes.

---

### Installation
Install using composer, you can find full instructions in the [ShipperHQ documentation](https://docs.shipperhq.com/installing-the-magento-2-webshopapps-matrixrate-extension/).

---

### Requirements

- Magento 2.4.4+
    - Compatibility with earlier editions is possible but not maintained
    - Supports both Magento Opensource (Community) and Magento Commerce (Enterprise)

---

### Configuration

1. **Enable MatrixRate**:
    - Log in to your Magento Admin.
    - Go to `Stores > Configuration > Sales > Shipping Methods > WebShopApps Matrix Rate`.
    - Set `Enabled` to `Yes`.

2. **Upload a CSV File**:
    - Prepare your shipping rules in a CSV file. You can find [examples and instructions in our documentation](https://docs.shipperhq.com/category/configuration/webshopapps-extensions/matrixrates/).
    - Go to the MatrixRate settings page and [upload your file](https://docs.shipperhq.com/1878-2/#How_to_Upload_a_CSV_File).

3. **Test Checkout**:
    - Add products to your cart and proceed to checkout to ensure the correct rates and methods appear.

---

### Support

For further information on using Matrixrates, please refer to our [online documentation](https://docs.shipperhq.com/category/configuration/webshopapps-extensions/matrixrates/).

As a free extension, WebShopApps MatrixRates is provided as-is without support.

WebShopApps MatrixRates is provided AS IS and we are not accepting feature requests at this time. Extended functionality and full support is available via [ShipperHQ](https://shipperhq.com).

---

### Frequently Asked Questions

#### 1. Can I set up free shipping for specific conditions?
Yes, you can define a `Shipping Price` of `0.00` in the CSV file for specific conditions, such as orders over a certain amount.

#### 2. What happens if no rules match?
If no rules match the customer’s criteria, MatrixRate will not display a shipping method. Ensure you have a fallback rule if needed.

#### 3. How do I troubleshoot issues with rates?
- Check our troubleshooting guide in the [ShipperHQ documentation](https://docs.shipperhq.com/troubleshooting-matrixrates/).
- Check the Magento logs for errors: `var/log/system.log` and `var/log/exception.log`.

---

### Credits
This extension borrows heavily from the Tablerate capability in Magento2.  In order to keep codebase as bug-free and
conformant as possible the tablerate code is used in preference to writing from scratch.  This hopefully also
allows for easier understanding by users.

We would like to acknowledge and thank the Magento 2 Development team for making their codebase open for such use.

The composer structure is taken from various sources, most heavily using structure from https://github.com/sjparkinson/static-review.

Assistance around composer, Magento2 structure, etc was also taken from these sources:

* [https://github.com/Genmato/MultiStoreSearchFields](http://)
* [https://alankent.wordpress.com/2014/08/03/creating-a-magento-2-composer-module/](http://)
* [https://github.com/SchumacherFM/mage2-advanced-rest-permissions](http://)

---

### Contribution

Any contribution is highly appreciated. The best way to contribute code is to open a [pull request on GitHub](https://help.github.com/articles/using-pull-requests).

---

### License

See license files.

We also dutifully respect the Magento OSL license.

---

### Copyright

Copyright (c) 2015 Zowta LLC & Zowta Ltd. (http://www.ShipperHQ.com)

## Changelog

All notable changes to this project will be documented in this file.
This project adheres to Semantic Versioning(http://semver.org/).

### 1.2.1
Fixed composer file

### 1.2.2
Removed version from composer so just uses tagged version on packagist

### 1.2.3
SHQ16-911 resolved shipping carrier validation in cart and checkout

### 1.2.4
M2-19 modified js validation

### 1.2.5
SHQ16-1346 make address fields not mandatory and include region for support for text field region

### 1.2.6
SHQ16-1335 updated docs links in readme and configuration header,  SHQ16-1346 make address fields not mandatory and include region for support for text field region, M2-19 modified js validation

### 1.2.7
SHQ16-1617 remove csv from url params

### 20.0.6
M2-20 account for php configuration temp dir

### 20.0.7
M2-23 remove crontab file, not required

### 20.0.8
M2-20 account for upload when no upload_tmp_dir setting in php config

### 20.0.9
M2-23 remove crontab file, not required, M2-20 account for upload when no upload_tmp_dir setting in php config, Updated readme with latest M2 issues and updated support statement

### 20.1.0
M2-23 remove crontab file

### 20.2.3 (2019-05-09)
SHQ18-1978 Trim postcode and ensure condition value is not null


### 20.1.5 (2019-05-09)
SHQ18-1978 Trim postcode and ensure condition value is not null


### 20.1.6 (2020-05-05)
MNB-3 Fix MatrixRate unit tests


### 20.1.7 (2020-06-30)
MNB-455 Submitted by JeroenVanLeusden. Extract condition codes to own method


### 20.1.8 (2020-07-16)
MNB-472 PR from JeroenVanLeusden - Accept -1 in condition from value in CSV import


### 20.1.9 (2020-12-21)
MNB-566 Clear down old date when upload new CSV


### 20.2.0 (2021-02-08)
MNB-923 Move DB install to XML. MNB-922 Fix unit tests


### 20.3.0 (2022-02-23)
MNB-2125 added support for BR postcode with hyphen
### 20.4.0 (2022-05-30)
MNB-2539 Add support for Magento 2.4.4


### 20.4.3 (2022-06-21)
MNB-2539 Add support for Magento 2.4.4


### 20.4.4 (2023-08-23)
SHQ23-433 Better handling of zero conditions


### 20.4.5 (2023-12-21)
SHQ23-1431 Update readme


### 20.4.6 (2024-01-23)
SHQ23-1381 Remove table on module uninstall


### 20.4.7 (2025-01-07)
SHQ23-4085 Update readme


### 20.4.9 (2025-01-31)
INFRA-893 Added missing mp release step


### 20.5.0 (2025-05-07)
SHQ23-4872 PHP8.4 and Magento 2.4.8 compatibility


### 20.5.1 (2025-08-27)
SHQ23-4872 PHP8.4 and Magento 2.4.8 compatibility


### 20.5.2 (2026-05-29)
ENG26-1125 Updates for Magento 2.4.9 and PHP 8.5 compatibility

## Recent Versions

| Version | Released |
|---|---|
| 20.5.2 | 2026-05-29 |
| 20.5.1 | 2025-08-27 |
| 20.5.0 | 2025-05-07 |
| 20.4.9 | 2025-01-31 |
| 20.4.8 | 2025-01-30 |
| 20.4.7 | 2025-01-07 |
| 20.4.6 | 2024-01-23 |
| 20.4.5 | 2023-12-21 |
| 20.4.4 | 2023-08-23 |
| 20.4.3 | 2022-06-21 |

Showing 10 of 32 versions. Full release history on https://packagento.com/webshopapps/module-matrixrate.

## Quality

Latest release (20.5.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 | Warning | 18 | 18 warnings (ruleset: Magento2) — 5 auto-fixable with phpcbf |
| PHPMD | Warning | 9 | 9 rule violations (MissingImport:4, ExcessiveMethodLength:2, ExcessiveClassComplexity:1, CyclomaticComplexity:1, NPathComplexity:1) |
| 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 | 15 | 15 | – | – |
| 2.4.8 | – | 15 | 15 | – |
| 2.4.9 | – | – | 13 | 13 |


### 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=["webshopapps/module-matrixrate"],
  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

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

