承接 oxcom/magento2-top-products 相关项目开发

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

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

oxcom/magento2-top-products

Composer 安装命令:

composer require oxcom/magento2-top-products

包简介

This is a module that extends Magento2 API to get list of TOP products.

README 文档

README

CI

This is a module that extends Magento2 API to get list of TOP products by next filters:

  • TOP selling products
  • TOP Free products
  • TOP Rated products

Top selling and free products are fetching from Magento2 reports.

Top rated products are fetching from Rates module and results are based on aggregated data.

Requirements

  • PHP 8.2, 8.3, 8.4 or 8.5
  • Magento 2.4.6+ (magento/framework ^103.0)

Install

$ composer require oxcom/magento2-top-products
$ bin/magento module:enable OxCom_MagentoTopProducts
$ bin/magento setup:upgrade
$ bin/magento setup:di:compile

API requests

GET /V1/products/top/{type} - Get list of top products by type. Where type can be:

  • selling - TOP selling products
  • free - TOP Free products
  • rated - TOP Rated products
Search criteria params

pageSize - Page size

currentPage - Current page

ratingCode - filter by rating type. This options is related ony for rated type. Possible values can be found in rating table.

period - filter by period. This options is related only for selling or free type. Possible values are:

  • yearly - annual report (default)
  • monthly - monthly report
  • daily - daily report

filter_groups - As product search criteria this filter will allow you to process products collection with more requirements.

Search criteria examples:

Filter top selling products by:

  • period: daily
  • price > 10
  • visibility = 4
  • pageSize = 10
  • currentPage = 2
$ curl -X GET \
  'https://example.com/rest/all/V1/products/top/selling?searchCriteria%5Bfilter_groups%5D%5B0%5D%5Bfilters%5D%5B0%5D%5Bfield%5D=visibility&searchCriteria%5Bfilter_groups%5D%5B0%5D%5Bfilters%5D%5B0%5D%5Bvalue%5D=4&searchCriteria%5Bfilter_groups%5D%5B0%5D%5Bfilters%5D%5B0%5D%5Bcondition_type%5D=eq&searchCriteria%5BpageSize%5D=10&searchCriteria%5BcurrentPage%5D=2&searchCriteria%5Bfilter_groups%5D%5B0%5D%5Bfilters%5D%5B1%5D%5Bfield%5D=price&searchCriteria%5Bfilter_groups%5D%5B0%5D%5Bfilters%5D%5B1%5D%5Bvalue%5D=10&searchCriteria%5Bfilter_groups%5D%5B0%5D%5Bfilters%5D%5B1%5D%5Bcondition_type%5D=gt&searchCriteria%5Bperiod%5D=daily' \
  -H 'authorization: Bearer {api-token}' \
  -H 'cache-control: no-cache'

Filter top rated products by:

  • ratingCode: Rating
  • status = 2
  • visibility = 4
  • pageSize = 10
  • currentPage = 2
$ curl -X GET \
  'https://example.com/rest/all/V1/products/top/rated?searchCriteria%5Bfilter_groups%5D%5B0%5D%5Bfilters%5D%5B0%5D%5Bfield%5D=visibility&searchCriteria%5Bfilter_groups%5D%5B0%5D%5Bfilters%5D%5B0%5D%5Bvalue%5D=4&searchCriteria%5Bfilter_groups%5D%5B0%5D%5Bfilters%5D%5B0%5D%5Bcondition_type%5D=eq&searchCriteria%5BpageSize%5D=10&searchCriteria%5BcurrentPage%5D=2&searchCriteria%5Bfilter_groups%5D%5B0%5D%5Bfilters%5D%5B1%5D%5Bfield%5D=status&searchCriteria%5Bfilter_groups%5D%5B0%5D%5Bfilters%5D%5B1%5D%5Bvalue%5D=1&searchCriteria%5Bfilter_groups%5D%5B0%5D%5Bfilters%5D%5B1%5D%5Bcondition_type%5D=eq&searchCriteria%5BratingCode%5D=Rating' \
  -H 'authorization: Bearer {api-token}' \
  -H 'cache-control: no-cache'

Dependencies

This module is using exists functionality of next modules:

  • magento/module-catalog
  • magento/module-review
  • magento/module-sales

Bugs and Issues

Please, if You found a bug or something, that is not working properly, contact me and tell what's wrong. It's nice to have an example how to reproduce a bug, or any idea how to fix it in Your request. I'll take care about it ASAP.

oxcom/magento2-top-products 适用场景与选型建议

oxcom/magento2-top-products 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 359 次下载、GitHub Stars 达 7, 最近一次更新时间为 2017 年 10 月 25 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「api」 「magento2」 「top products」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

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

围绕 oxcom/magento2-top-products 我们能提供哪些服务?
定制开发 / 二次开发

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

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

统计信息

  • 总下载量: 359
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 7
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 7
  • Watchers: 3
  • Forks: 5
  • 开发语言: PHP

其他信息

  • 授权协议: LGPL-3.0
  • 更新时间: 2017-10-25