定制 markiewiczl/module-order-processor 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

markiewiczl/module-order-processor

Composer 安装命令:

composer require markiewiczl/module-order-processor

包简介

Magento 2 module that adds a comment to an order asynchronously via a queue after it's placed.

README 文档

README

Asynchronously add comments to orders after placement using Magento 2 queues.

Installation

Install the module via Packagist using Composer:

composer require markiewiczl/module-order-processor

Overview

This module provides a way to add order_id to queue and add a configurable comment to the order during asynchronous processing.

Admin Configuration

You can enable/disable the order processor and customize the comment text via the admin panel:

Admin Configuration

  • Is Enabled Order Processing – Toggles whether the module functionality is active.
  • Comment Text – The content of the comment added to the order when the queue message is consumed.

ACL Permissions

The module registers custom ACL resources for access control. You can manage access to the configuration via System > Permissions > User Roles:

ACL Configuration

Order Comment Processing

The module processes orders asynchronously through RabbitMQ, adding comments to the order status history and display configured massage on admin order panel:
Order Comment Processing

RabbitMQ Integration

Orders are processed through the message queue system:
RabbitMQ Message

  • Messages contain order IDs for processing
  • Uses the order.processor routing key

Queue Consumer Operation

Process can be run manually using cron bin/magento queue:consumer:start order.processor

OR

The Process can run as a background if you add

'cron_run' => true,
'max_messages' => 10,
'consumers' => [
'order.processor',
],
'multiple_processes' => [
'order.processor' => 2
]
],

to you env.php file and running bin/magento cron install. Then you can check is process running ps aux:
Queue Consumer Process

Updates possibilities

Adding comment

By default, the order comment is added when the corresponding message is consumed from the queue. If needed, you can modify the implementation to retrieve the configuration value before the message is published, depending on your business requirements.

RabbitMQ validation

Support for Dead Letter Exchange (DLX) is available, but it must be configured directly within RabbitMQ to function correctly.

This allows you to capture undeliverable or failed messages for further analysis or retry mechanisms.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-05-08