The Home for
Magento Excellence

Explore. Discover. Elevate. #magento

162
Modules Tested
98
Ready for Magento 2.4
64
Need Your Help
Potentially Abandoned v1.1.1
Ready to Install
Build tests pass on Magento 2.4.8-p3

Product Data Pre-Loader

ecomdev/magento2-product-data-preloader

This extension provides an easy way to pre-load data for product collections like prices, stock data, and many more by using different types of load types.

44,939
Downloads
Below average
116
GitHub Stars
Above average
3y ago
Last Release
2
Open Issues

Quality Score

3/5
Installs via Composer
DI compiles correctly
Templates compile
PHPStan

Recent Test History

Each release is tested against the latest Magento version at that time.

v1.1.1 on Magento 2.4.8-p3
Dec 15, 2025
v1.1.1 on Magento 2.4.8-p2
Aug 14, 2025
v1.1.1 on Magento 2.4.8
May 17, 2025
v1.1.1 on Magento 2.4.7-p4
Feb 15, 2025
v1.1.1 on Magento 2.4.7-p3
Oct 14, 2024
v1.1.1 on Magento 2.4.7-p2
Sep 7, 2024

+4 older tests

GitHub Repository
Source code & docs
Packagist
Version history
Issues & Support
Get help or report bugs

Share This Module's Status

Product Data Pre-Loader Magento compatibility status badge

README

Loaded from GitHub

Product Data Pre-Loader

Magento platform code and third-party extensions in a lot of cases produce redundant database queries on product collections load.

This module provides an easy way to pre-load data for product collections like prices, stock data, and many more by using different types of load types. Right now it supports 3 types of loaded product collections:

  • list Products that are using price index in selection, so it is safe to use stale index data for data loader
  • cart Products that are used to calculate customers shopping cart and require accurate data to be loaded from database
  • other Products that are not falling into any of the above categories

In order to pre-load data for a product collection, you need to implement EcomDev\ProductDataPreLoader\DataService\DataLoader interface with such methods:

  • isApplicable(string $type): bool method that is used to decide if your loader compatible with specific product collection type.
  • load(ScopeFilter $filter, ProductWrapper[] $products): array method that preloads data into LoadService that can be used later to access data by your loader id.

Custom loaders should be added to LoadService object via DI configuration like this:

<type name="EcomDev\ProductDataPreLoader\DataService\LoadService">
    <arguments>
        <argument name="loaders" xsi:type="array">
            <item name="my_custom_loader" xsi:type="object">My\Module\Loader\MyCustomLoader</item>
        </argument>
    </arguments>
</type>

Installation

Given EOL of Composer 1 all new packagist packages are not published for some time. So best way to keep your install up-to-date is to use Composer 2.0.

composer require ecomdev/magento2-product-data-preloader

Usage Example

This sample module implements optimistic preloader for configurable product data without taking into account simple product status for:

  • Price of configurable product on product list
  • Stock availability from MSI for configurable product
  • Minimal tier price across simple products for configurable

This content is fetched directly from the module's GitHub repository. We are not the authors of this content and take no responsibility for its accuracy, completeness, or any consequences arising from its use.

Back to All Modules