Download the PHP package amadeco/module-elasticsuite-stock without Composer

On this page you can find all versions of the php package amadeco/module-elasticsuite-stock. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package module-elasticsuite-stock

Amadeco ElasticSuite Stock Filter Module for Magento 2

Latest Stable Version Magento 2 PHP License

SPONSOR: Amadeco

This module by Amadeco extends Smile ElasticSuite (https://github.com/Smile-SA/elasticsuite) to add an advanced stock filter in the layered navigation.

Features

Capture d'écran 2025-04-13 à 21 23 40

Installation

Requirements

Configuration

Go to Stores > Configuration > ElasticSuite > Stock Filter

Configure the following options:

Usage

After installation and configuration, the stock filter will automatically appear in the layered navigation on category pages and search results pages (remember to reindex after installation).

How It Works

Smart Stock Status Determination

This module creates an indexed attribute stock_status that handles stock differently based on your Magento configuration:

When Backorders are Disabled

When Backorders are Enabled

Filter Options in Layered Navigation

The filter provides these options:

  1. In Stock:

    • Shows products with positive inventory when backorders are enabled
    • Follows standard Magento stock status rules when backorders are disabled
  2. Out of Stock (can be hidden via configuration):
    • Shows products with zero or negative inventory when backorders are enabled
    • Shows products marked as out of stock when backorders are disabled

This approach helps customers find products based on actual availability while respecting your inventory settings.

Technical Details

Stock Data Implementation

This module leverages the existing stock.is_in_stock and stock.qty fields from quantity_and_stock_status attribute and creates a derived stock_status field that combines this information intelligently.

Instead of relying on Magento's quantity_and_stock_status attribute (which has limitations for filtering ; see reported issue: https://github.com/magento/magento2/issues/33453), our module:

Compatibility with Other ElasticSuite Modules

Dependency on Smile_ElasticsuiteRating: Technical Explanation

Smile_ElasticsuiteRating is a required dependency due to how Magento's preference system works:

Both modules (Rating and our Stock module) attempt to override Smile\ElasticsuiteCatalog\Model\Layer\FilterList using preferences. In Magento's preference system, when multiple modules declare a preference for the same class, only the last one loaded (based on module loading order) takes effect. If Smile_ElasticsuiteRating is installed but our module's preference isn't properly applied, our stock filter won't appear in the layered navigation.

To solve this conflict, we must:

This approach requires Smile_ElasticsuiteRating to be present since we're explicitly overriding its class. Without it, Magento would throw a fatal error when trying to resolve this preference.

Note: We recognize that the current dependency on Smile_ElasticsuiteRating is not ideal. In a future release, we plan to implement a more flexible architecture.

License

This module is licensed under the Open Software License ("OSL") v3.0. See the LICENSE.txt file for details.


All versions of module-elasticsuite-stock with dependencies

PHP Build Version
Package Version
Requires php Version ~8.1.0||~8.2.0||~8.3.0
magento/framework Version >=103.0.0
magento/magento-composer-installer Version *
magento/module-catalog-inventory Version >=100.1.0
smile/elasticsuite Version >=2.8.0
smile/module-elasticsuite-rating Version ^2.3
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package amadeco/module-elasticsuite-stock contains the following files

Loading the files please wait ....