承接 run_as_root/ext-magento2-product-priorities 相关项目开发

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

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

run_as_root/ext-magento2-product-priorities

Composer 安装命令:

composer require run_as_root/ext-magento2-product-priorities

包简介

This module provides a product priorities column inside Admin Products Grid.

README 文档

README

title RunAsRoot Product Priorities
keywords run_as_root, priority, bestseller, grid, form
module_name RunAsRoot_ProductPriorities
author David Lambauer, Denys Sliepnov
send_questions_to david@run-as-root.sh
category Marketing

General

Provides a product priorities column inside Admin Products Grid.

Installations

composer require run_as_root/ext-magento2-product-priorities
bin/magento setup:upgrade

Features

'Priority' column inside 'Products' grid

Priority column includes the proportion value of relevance for each product. These values should match the Priority Matrix.

Priority Matrix

Priority name Relevance proportion value % Cell background color
A 90 green
B 80 light-green
... ... ...
F 0 red

Priority Matrix is editable (data stores at the database inside run_as_root_product_priorities table). There are initial values. Priority Name and relevance proportion value % fields must be unique.

Admin can adjust priority for a specific period of time.

Priority value calculates by the next formula:

  1. report data loads for the specific period of time from the table sales_bestsellers_aggregated_daily
  2. system finds the product with the greatest ordered_qty value and marks the target product as top bestseller (takes the highest priority value from the matrix, i.e. A)
  3. system walks through other products and calculates priority value by the formula: 4. targetProduct['ordered_qty'] * 100 / topBestsellerProduct['ordered_qty'] = targetProduct['proportion_value'] 5. system fetches the max relevance proportion value from the Priority Matrix that is less than targetProduct['proportion_value']

Technical Specification

Api

RunAsRoot\ProductPriorities\Api\Data\ProductPriorityInterface

Defines all the getters and setters for the Product Priority entity.

RunAsRoot\ProductPriorities\Api\ProductPriorityRepositoryInterface

Gives access to persistent data entities. Have the following methods:

  • save(ProductPriorityInterface $productPriority): Creates a new record if no id present, otherwise updates an existing record with the specified id.
  • get(int $entityId): Performs a database lookup by id and returns a data entity interface
  • delete(ProductPriorityInterface $productPriority): Deletes the specified entity
  • deleteById(int $entityId): Deletes the specified entity by id

Block

RunAsRoot\ProductPriorities\Block\Adminhtml\ProductPriority\Buttons\GenericButton

Implements shared methods that are used inside Product Priority Form.

  • getEntityId(): returns an id for the specific entity
  • getUrl($route = '', $params = []): implements urlBuilder wrapper

RunAsRoot\ProductPriorities\Block\Adminhtml\ProductPriority\Buttons\BackButton

Implements back action for button if admin on the Product Priority Form page.

RunAsRoot\ProductPriorities\Block\Adminhtml\ProductPriority\Buttons\DeleteButton

Implements delete action for button if admin on the Product Priority Form page.

RunAsRoot\ProductPriorities\Block\Adminhtml\ProductPriority\Buttons\SaveButton

Provides save action data for the Split Save button on the Product Priority Form page.

RunAsRoot\ProductPriorities\Block\Adminhtml\System\Config\Form\Field\Date

Implements DatePicker frontend_model for System Config.

ConfigProvider

RunAsRoot\ProductPriorities\ConfigProvider\General

Implements the functionality of fetching module configurations.

  • isModuleEnabled(int $storeId): returns if module is Enabled/Disabled
  • getFromDate(int $storeId): returns start date of the period

Controller

RunAsRoot\ProductPriorities\Controller\Adminhtml\Product\Priorities

Returns the Product Priorities Grid page

RunAsRoot\ProductPriorities\Controller\Adminhtml\Product\MassDelete

Handles the mass delete Product Priority entities on the Product Priorities Grid

RunAsRoot\ProductPriorities\Controller\Adminhtml\Product\AbstractPriority

Implements shared methods that are used by Controllers (Product Priority Form).

RunAsRoot\ProductPriorities\Controller\Adminhtml\Product\Priority\*

Implements the CRUD actions

DataProvider

RunAsRoot\ProductPriorities\DataProvider\Priority

Implements the calculation process and data provider for the 'Priority' column

  • getData(): returns the processed data
  • prepareCollection(): initiates and adjusts bestseller products collection
  • getPriorityByProportion(int $proportionValue): returns the match value from the Matrix
  • getPriorities(): returns the Matrix data

Model

RunAsRoot\ProductPriorities\Model\ProductPriority\DataProvider

Implements data provider for Product Priority entity on the Create/Edit Form

RunAsRoot\ProductPriorities\Model\*

Implement entity related models, resource model, collection, repository

Setup

RunAsRoot\ProductPriorities\Setup\Patch\Data\InsertSampleData

Inserts the initial data to database (Priority Matrix)

Ui

RunAsRoot\ProductPriorities\Ui\Component\Listing\Columns\Actions

Implements Edit/Delete actions for Product Priorities Grid

RunAsRoot\ProductPriorities\Ui\Component\Listing\Columns\ProductPriority

Describes the 'Priority' column class

Configuration

tab group section field
run_as_root general Product Priorities Enable
run_as_root general Product Priorities From Date

Product Priorities Grid

  • Navigate to Marketing -> run_as_root -> Product Priorities

run_as_root/ext-magento2-product-priorities 适用场景与选型建议

run_as_root/ext-magento2-product-priorities 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 3 次下载、GitHub Stars 达 0, 最近一次更新时间为 2022 年 10 月 10 日, 在 PHP 生态内属于活跃度较高的组件。

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

围绕 run_as_root/ext-magento2-product-priorities 我们能提供哪些服务?
定制开发 / 二次开发

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

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

统计信息

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

GitHub 信息

  • Stars: 0
  • Watchers: 2
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-10-10