承接 ecomdev/magento2-product-data-preloader 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

ecomdev/magento2-product-data-preloader

Composer 安装命令:

composer require ecomdev/magento2-product-data-preloader

包简介

Magento 2 Product Data Pre-Loader FTW

README 文档

README

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

ecomdev/magento2-product-data-preloader 适用场景与选型建议

ecomdev/magento2-product-data-preloader 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 65.25k 次下载、GitHub Stars 达 119, 最近一次更新时间为 2021 年 08 月 21 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 ecomdev/magento2-product-data-preloader 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 ecomdev/magento2-product-data-preloader 我们能提供哪些服务?
定制开发 / 二次开发

基于 ecomdev/magento2-product-data-preloader 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 65.25k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 119
  • 点击次数: 36
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 119
  • Watchers: 16
  • Forks: 16
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-08-21