# nosto/module-nostocmp

> Nosto Category Merchandising extension for Magento 2

`composer require nosto/module-nostocmp`

Canonical URL: https://packagento.com/nosto/module-nostocmp

## At a glance

- **Vendor**: nosto (https://packagento.com/nosto.md)
- **Latest version**: 5.4.0 — released 2025-10-14
- **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/nosto/module-nostocmp 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 nosto/module-nostocmp:*
   bin/magento setup:upgrade
   bin/magento setup:di:compile
   bin/magento cache:flush
   ```

## What it does

Nosto Category Merchandising extension for Magento 2

## README

With Category Merchandising, you can arm some of your highest trafficked pages with your own customized merchandising rules using our Sorting and Highlighting capabilities. These allow you to simultaneously sequence your category pages according to specific merchandising goals and highlight specific products by heroing them, and placing them in the forefront of your users.

## Changelog

All notable changes to this project will be documented in this file. This project adheres to Semantic Versioning.

#### 5.4.0
* Add compatibility with OpenSearch implementation

#### 5.3.2
* Update nosto/module-nostotagging package to ^8.0.0

#### 5.3.1
* Add nullcheck to avoid logging errors when the current category is not a regular Magento Category

#### 5.3.0
* Improve compatibility with Magento 2.4.6

#### 5.2.2
* Restore totalPrimaryCount result from GraphQL query as product count in order to fix an issue with pagination.

#### 5.2.1
* Fix product counter by using total products that have been rendered instead of totalPrimaryCount result from GraphQL query.

#### 5.2.0
* Update nosto/module-nostotagging package to ^7.0.0

#### 5.1.0
* Add support for Magento 2 GrahpQl filters

#### 5.0.1
* Fix parsing existing query params for product URL generation

#### 5.0.0
* Adds compatibility with PHP 8 and bumps minimum PHP version as 7.4
* Adds compatibility with Magento 2.4.4 and module-nostotagging >6.0

#### 4.0.4
* Add compatibility meta tag for CMP

#### 4.0.3
* Fix GraphQl response when querying the same page more than once

#### 4.0.2
* Fix pagination when CM is disabled

#### 4.0.1
* Fix empty results issues on Magento's GraphQl pagination

#### 4.0.0
* Remove support for MySQL as search engine
* Move CategoryMerchandising util to php-sdk
* Refactor Merchandise service

#### 3.3.3
* Fix fallback sorting issue on GraphQl when merchandising is not enabled

#### 3.3.2
* Fix category page issue on GraphQl when merchandising is not enabled

#### 3.3.1
* Fix sorting for CM result served through Magento's GraphQl

#### 3.3.0
* Fix incorrect products number in filters
* Add support for subcategory filtering
* Display general nosto sorting when customer is missing
* Fix search page bug for MySQL and ElasticSearch
* Introduce possibility to define page size through DI
* Fix facet mapping to Nosto's include parameters
* Fix pagination issue in Elasticsearch
* Fix filter's price format issue

#### 3.2.2
* Add ACL resource for the module

#### 3.2.1
* Build boolean filters for CMP 

#### 3.2.0
* Add configuration to select fallback sorting for relevance

#### 3.1.2
* Improve logging for getting filter values

#### 3.1.1
* Fix version in composer file

#### 3.1.0
* Cache category mapping block
* Render magento sorting directly when Nosto customer cookie is missing
* Render frontend layouts only when CM configuration is enabled
* Fix CM not displaying Nosto sorting when batchToken is null
* Fix issue where filters were not passed when using MySQL
* Return Magento sorting when CM call fails
* Fix Magento products graphql query pagination issue
* Add support for fetching more than 250 products from Nosto
* Add category merchandising support for headless (graphql) implementations

#### 3.0.0
* Add support for using Elasticsearch as a catalog search engine
* Introduce possibility to use all categories (not only the ones in navigation) with Nosto's category merchandising

#### 2.0.3
* Fix the default max product limit configuration and set the default value to be 250 which is the current max products limit in Nosto     

#### 2.0.2
* Introduce possibility to define maximum amount of products to be fetched from Nosto to support category pages with that allow all products to be viewed

#### 2.0.1
* Change the script type to `application/json` for category mapping
* Add possibility to debug the category query via Magento's debug logging 
* Remove redundant Magento's internal full page cache busting logic
* Fix the category page sorting issue when additional / default category sorting is in use 

#### 2.0.0
* Update Nosto PHP-SDK dependency to 5.0.0
* Update compatibility with NostoTagging Module 5.0

#### 1.2.2
* Fix [PHP SDK](https://github.com/Nosto/nosto-php-sdk) version constraint clash with [Nosto's Magento 2 base module](https://github.com/Nosto/nosto-magento2)

#### 1.2.1
* Fix bug related to Nosto sorting option in admin category page

_(Changelog truncated for .md surface. Full history on https://packagento.com/nosto/module-nostocmp.)_

## Recent Versions

| Version | Released |
|---|---|
| 5.4.0 | 2025-10-14 |
| 5.3.2 | 2025-07-28 |
| 5.3.1 | 2023-06-28 |
| 5.3.0 | 2023-04-11 |
| 5.2.2 | 2023-01-04 |
| 5.2.1 | 2022-12-14 |
| 5.2.0 | 2022-11-18 |
| 5.1.0 | 2022-10-24 |
| 5.0.1 | 2022-10-11 |
| 5.0.0 | 2022-05-27 |

Showing 10 of 56 versions. Full release history on https://packagento.com/nosto/module-nostocmp.

## Dependencies

### Require

| Package | Constraint |
|---|---|
| ext-json | * |
| nosto/module-nostotagging | ^8.0 |
| nosto/php-sdk | >=5.5.0 |
| php | >=7.4 |

### Require (dev)

| Package | Constraint |
|---|---|
| drenso/phan-extensions | 3.5.1 |
| magento-ecg/coding-standard | 3.* |
| magento/magento-coding-standard | ^5.0 |
| magento/module-catalog-graph-ql | 100.4.2 |
| magento/module-elasticsearch | * |
| magento/module-layered-navigation | 100.4.2 |
| magento/module-store | 101.1.2 |
| magento/zendframework1 | 1.14.3 |
| mridang/pmd-annotations | ^0.0.2 |
| phan/phan | 5.3.0 |
| phing/phing | 2.* |
| phpmd/phpmd | ^2.6 |
| sebastian/phpcpd | 4.1.0 |
| squizlabs/php_codesniffer | ^3.5 |
| staabm/annotate-pull-request-from-checkstyle | ^1.1 |

## Quality

Latest release (5.4.0) 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 | – | – | 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 | Warning | 54 | 54 warnings (ruleset: Magento2) — 4 auto-fixable with phpcbf |
| PHPMD | Warning | 10 | 10 rule violations (UnusedFormalParameter:10) |
| Cpd | Pass | 0 |  |
| Composer validate | Info | 2 | valid; 2 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 | 146 | 146 | – | – |
| 2.4.8 | – | 147 | 147 | – |
| 2.4.9 | – | – | 150 | 150 |


### 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 | Fail | 4 | 4 advisories (medium:3, high:1); 1 high+, 3 medium/unknown, 0 low |
| 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=["nosto/module-nostocmp"],
  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

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

