# tweakwise/magento2-tweakwise

> Magento 2 module for Tweakwise integration

`composer require tweakwise/magento2-tweakwise`

Canonical URL: https://packagento.com/tweakwise/magento2-tweakwise

## At a glance

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

## What it does

Magento 2 module for Tweakwise integration

## README

Install package using composer
```sh
composer require tweakwise/magento2-tweakwise
```
This will install tweakwise/magento2-tweakwise and tweakwise/magento2-tweakwise-export

Enable module(s) and run installers
```sh
php bin/magento module:enable Tweakwise_Magento2TweakwiseExport Tweakwise_Magento2Tweakwise
php bin/magento setup:upgrade
php bin/magento setup:static-content:deploy
```

### Configuration
When the extension is installed it is disabled by default. There are three different parts which can be enabled separately. Configuration can be found at Stores -> Configuration -> Catalog -> Tweakwise.

#### Rundown of all possible settings
Below is a rundown of all configuration options

##### General:
1) Authentication key: This is used to communicate with tweakwise and determines your navigator instance, it should be the same as the key found in the navigator under `Connectivity > End points`.
2) Grouped producets: Enable this after the grouped export has been enabled and imported in tweakwise. This wil enable filtering based on variant data and enabled the product image to be controlled by tweakwise so that the correct color is shown based on selected filters. This requires the image url in tweakwise to be configured correctly. If this is not enabled and you've exported grouped products the catalog may be empty.

##### Layered Navigation (All settings depend on Enabled having value yes):
1) Enabled: Use tweakwise results in navigation, if disabled the standard magento navigation is used. Don't disable the anchor tag on main categories, this causes al products to be shown. The anchor tag can be disabled on sub-categories.
2) Hide facets with only one option: Given a result set from tweakwise in which a filter has only one option show that filter or not?
3) Use default magento filter renderer: Use Magento standard filter templates or use templates bundled by the module.
   If you want to make full use of the features provided by this module then this should be set to No (i.e. make use of tweakwise template files).
4) Filter form: This depends on 'Use default magento filter renderer' having value No. Render all filters in a form with filter buttons so that the user can select a set of filters and then navigate to the result instead of immediately navigating to the results when a filter is clicked.
5) Filter url query parameters: Tweakwise filter urls will have all query parameters of the page in it so also the "cid" and utm_source parameters if present.
   You can determine in which way you want to filter these out (if any).
6) Filter url query arguments: This depends on 'Filter url query parameters' having any value not equal to 'Dont Filter'. This field specifies which parameters should be removed from the tweakwise filter urls.
7) Url strategy: Has two options Query parameters and Seo path slug. If query parameters is selected then the tweakwise filter urls (and thus your navigation urls) will be constructed as
    `www.example.com/example-category?color=red`.
    
    If Seo path slugs is selected the url is constructed as `www.example.com/example-category/color/red`.

##### Seo (All settings depend on Enabled having value yes)
1) Enabled: use Seo options yes or no.
2) Filter whitelist: A list of filters which should be indexable (all filters not selected here are not indexable). If a filter is marked as not indexable then its href attribute will be set to "#" its original url will be set in a data-seo-href attribute which will be used by javascript to navigate.
    Note that the category filter is always marked as indexable. This used to be a multiselect field containing magento attributes however tweakwise facilitates derived properties, these properties are not related to magento attributes and as such these filters would be not indexable.
    The field has changed to a comma separated text field so that these derived properties can be properly whitelisted.
3) Max allowed facets: This combines with the Filter whitelist setting. Filters are indexable if and only if they are in the whitelist and the selected filter count does not go above max_allowed_facets.
    The reason this is an AND check is because otherwise indexation will still happen on the non whitelisted filters and it is unclear which url is present (an arbitrary amount of filters could be selected).
    Suppose max allowed facet is 1 and only "size" is in the whitelist. Then filter "color" with value "red" is not indexable (since "color" is not in the whitelist).
    If we now allow the size filter to still be indexable then url example.com/category/color/red/size/M would be indexable whereas example.com/category/color/red is not which is incorrect.
    This would lead to infinite crawling on filter urls which is undesirable 
    
##### Autocomplete (All settings depend on Enabled having value yes)
1) Enabled: Use tweakwise autocomplete results or not.
2) Use Suggestions Autocomplete: Use new suggestion api (Yes) or use the standard autocomplete api (No) 
3) Show products *: Show product suggestions in autocomplete results.
4) Show suggestions *: Show search suggestions in autocomplete results.
5) Stay in category: Use the current category when getting autocomplete results.
6) Maximum number of results *: At most this many autocomplete results will be show.
* Hidden when Use Suggestions Autocomplete is enabled. These settings are not used in the new suggestions api. The new suggestions api is configured in tweakwise itself.

_(README truncated for .md surface. Full README on https://packagento.com/tweakwise/magento2-tweakwise.)_

## Recent Versions

| Version | Released |
|---|---|
| 9.0.1 | 2026-05-22 |
| 9.0.0 | 2026-04-24 |
| 8.11.0 | 2026-03-24 |
| 8.10.0 | 2026-03-06 |
| 8.9.1 | 2026-01-29 |
| 8.9.0 | 2026-01-28 |
| 8.8.0 | 2025-12-09 |
| 8.7.1 | 2025-10-17 |
| 8.7.0 | 2025-09-30 |
| 8.6.1 | 2025-08-21 |

Showing 10 of 78 versions. Full release history on https://packagento.com/tweakwise/magento2-tweakwise.

## Dependencies

### Require

| Package | Constraint |
|---|---|
| ext-json | * |
| ext-libxml | * |
| ext-pcre | * |
| ext-simplexml | * |
| guzzlehttp/guzzle | >=6.0 |
| guzzlehttp/promises | >=1.4 |
| php | ^8.1 |
| tweakwise/magento2-tweakwise-export | >=7.8.3 |

### Require (dev)

| Package | Constraint |
|---|---|
| emico/code-quality | ~10.6.0 |
| magento/framework | ^103.0 |

### Replace

| Package | Constraint |
|---|---|
| emico/tweakwise | v4.3.1 |

## Quality

Latest release (9.0.1) 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 | – | – | 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 | 82 | 1 error, 81 warnings (ruleset: Magento2) — 32 auto-fixable with phpcbf |
| PHPMD | Warning | 43 | 43 rule violations (UndefinedVariable:25, UnusedFormalParameter:18) |
| Cpd | Warning | 2 | 2 duplicated chunks spanning 182 total lines (min-lines=5, min-tokens=70) |
| Composer validate | Info | 3 | valid; 3 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 | 16 | 16 | – | – |
| 2.4.8 | – | 15 | 15 | – |
| 2.4.9 | – | – | 15 | 15 |


### 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 |
| 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=["tweakwise/magento2-tweakwise"],
  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

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

