承接 rollpix/module-orderstatuscolor 相关项目开发

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

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

rollpix/module-orderstatuscolor

Composer 安装命令:

composer require rollpix/module-orderstatuscolor

包简介

Magento 2 module to customize order status colors in admin grids with visual color picker

README 文档

README

Latest Stable Version License Magento 2 Mage-OS PHP

A Magento 2 module that allows you to customize order status colors in the admin panel. Add visual color badges to order statuses for better order management and quick status identification.

Developed by Rollpix

Features

  • Visual Color Picker - Easy-to-use color palette with 24 predefined colors + custom color picker
  • Color Column in Status Grid - See all configured colors at a glance in Stores > Order Status
  • Colored Status Badges - Order status displayed as colored badges in the Orders grid
  • Works with All Statuses - Compatible with native Magento statuses and custom ones
  • Automatic Background - Background color calculated automatically (15% opacity of main color)
  • No Core Modifications - Uses plugins and layout XML, no core file changes
  • Mage-OS Compatible - Fully compatible with Mage-OS distributions

Compatibility

Platform Versions
Magento Open Source 2.4.4, 2.4.5, 2.4.6, 2.4.7, 2.4.8
Adobe Commerce 2.4.4, 2.4.5, 2.4.6, 2.4.7, 2.4.8
Mage-OS 2.0.x, 2.1.x
PHP 7.4, 8.0, 8.1, 8.2, 8.3, 8.4

Screenshots

Color Picker in Status Form

The color picker includes a palette of predefined colors and a custom color picker for any HEX color.

Orders Grid with Colored Badges

Order statuses are displayed as colored badges for quick visual identification.

Order Status Grid with Color Column

View all configured colors in the Order Status management grid.

Requirements

  • Magento 2.4.4+ / Mage-OS 2.0+
  • PHP 7.4 or higher (including PHP 8.4)

Installation

Via Composer (Recommended)

composer require rollpix/module-orderstatuscolor

Enable the Module

php bin/magento module:enable Rollpix_OrderStatusColor
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy -f
php bin/magento cache:flush

Manual Installation

  1. Create directory app/code/Rollpix/OrderStatusColor
  2. Download and extract the module files into that directory
  3. Run the enable commands above

Configuration

Setting Up Status Colors

  1. Navigate to Stores > Settings > Order Status in the Magento Admin
  2. Click on any existing status to edit, or create a new status
  3. You will see a new Status Color field with:
    • A palette of 24 predefined colors (click to select)
    • A custom color picker for any color
    • A text field to enter HEX codes manually (e.g., #FF5733)
  4. Select or enter your desired color
  5. Click Save Status

Viewing Colors

  • Order Status Grid (Stores > Order Status): A new "Color" column shows the configured color swatch and HEX code
  • Orders Grid (Sales > Orders): The Status column displays colored badges

Color Format

  • Use 6-digit HEX format: #RRGGBB (e.g., #FF5733)
  • 3-digit HEX is also supported: #RGB (e.g., #F53)
  • Leave empty for default gray color (#303030)

Predefined Color Palette

The module includes 24 carefully selected colors:

Color HEX Use Case
Green #2ECC71 Complete, Success
Blue #3498DB Processing, In Progress
Red #E74C3C Cancelled, Failed
Orange #E67E22 Pending, On Hold
Yellow #F1C40F Warning, Attention
Purple #9B59B6 Special, VIP
Gray #7F8C8D Closed, Archived

Technical Details

Database Changes

The module adds a status_color column (VARCHAR 7) to the sales_order_status table to store HEX color codes.

Module Structure

Rollpix/OrderStatusColor/
├── Block/
│   └── Adminhtml/Order/Status/Grid/Renderer/
│       └── Color.php                 # Renders color swatch in status grid
├── Model/
│   └── StatusColorProvider.php       # Provides status colors from database
├── Plugin/
│   ├── Block/Adminhtml/Order/Status/Edit/
│   │   └── Form.php                  # Adds color picker to status form
│   └── Controller/Adminhtml/Order/Status/
│       └── Save.php                  # Saves color when status is saved
├── ViewModel/
│   └── StatusColors.php              # Generates dynamic CSS for badges
├── etc/
│   ├── adminhtml/
│   │   └── di.xml                    # Plugin declarations
│   ├── db_schema.xml                 # Database schema
│   ├── db_schema_whitelist.json
│   └── module.xml                    # Module declaration
├── view/adminhtml/
│   ├── layout/
│   │   ├── sales_order_index.xml     # Adds CSS to orders grid
│   │   └── sales_order_status_index.xml  # Adds color column to status grid
│   ├── templates/
│   │   └── status-colors.phtml       # Dynamic CSS generation
│   ├── ui_component/
│   │   └── sales_order_grid.xml      # Custom status column component
│   └── web/
│       ├── css/
│       │   ├── source/_module.less   # Base badge styles
│       │   └── status-grid.css       # Status grid styles
│       ├── js/
│       │   ├── grid/columns/select.js    # Custom grid column
│       │   └── status-colors.js          # Color initialization
│       └── template/ui/grid/cells/
│           └── status.html           # Knockout template for badges
├── composer.json
├── registration.php
└── README.md

Troubleshooting

Colors not showing in Orders grid

  1. Clear all caches: php bin/magento cache:flush
  2. Deploy static content: php bin/magento setup:static-content:deploy -f
  3. Clear browser cache

Color picker not appearing in status form

  1. Recompile DI: php bin/magento setup:di:compile
  2. Clear generated code: rm -rf generated/code/*
  3. Flush cache: php bin/magento cache:flush

Column not showing in Status grid

  1. Clear layout cache: php bin/magento cache:clean layout
  2. Clear full page cache: php bin/magento cache:clean full_page

Uninstallation

php bin/magento module:disable Rollpix_OrderStatusColor
composer remove rollpix/module-orderstatuscolor
php bin/magento setup:upgrade
php bin/magento cache:flush

Note: The status_color column will remain in the database. To remove it completely, run:

ALTER TABLE sales_order_status DROP COLUMN status_color;

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Support

License

This module is licensed under the MIT License - see the LICENSE file for details.

Changelog

1.0.0

  • Initial release
  • Color picker with 24 predefined colors
  • Custom color picker support
  • Color column in Order Status grid
  • Colored badges in Orders grid
  • Full compatibility with:
    • Magento 2.4.4 - 2.4.8
    • Mage-OS 2.0.x - 2.1.x
    • PHP 7.4 - 8.4

Made with love by Rollpix

rollpix/module-orderstatuscolor 适用场景与选型建议

rollpix/module-orderstatuscolor 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 4 次下载、GitHub Stars 达 0, 最近一次更新时间为 2026 年 01 月 24 日, 在 PHP 生态内属于活跃度较高的组件。

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

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

围绕 rollpix/module-orderstatuscolor 我们能提供哪些服务?
定制开发 / 二次开发

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

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-01-24