承接 magekwik/attribute-set-limit 相关项目开发

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

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

magekwik/attribute-set-limit

Composer 安装命令:

composer require magekwik/attribute-set-limit

包简介

A Magento 2 module to enforce a maximum limit of 500 attributes per product attribute set, preventing additions via admin or API when the limit is reached.

README 文档

README

Module

License

Overview

The Magekwik Attribute Set Limit module for Magento 2 enforces a maximum limit of 500 attributes per product attribute set. It prevents additional attributes from being assigned via the admin panel or API once the limit is reached, ensuring optimal performance and maintainability of attribute sets in large-scale Magento installations.

This module is designed for Magento 2 certified developers and store administrators who need to enforce strict governance over product attribute sets to prevent excessive complexity.

Features

  • Enforces a configurable limit of 500 attributes per product attribute set.
  • Blocks attribute additions via admin panel (Stores > Attributes > Attribute Set) and API calls.
  • Provides clear error messages when the limit is exceeded.
  • Compatible with Magento Open Source and Adobe Commerce (2.4.x and later).

Installation

Via Composer (Recommended)

  1. Add the module to your Magento project:

    composer require magekwik/attribute-set-limit
  2. Enable the module and update the Magento setup:

    bin/magento module:enable Magekwik_AttributeSetLimit
    bin/magento setup:upgrade
    bin/magento cache:flush

Manual Installation

  1. Clone or download the repository to app/code/Magekwik/AttributeSetLimit.
  2. Run the following commands:
    bin/magento module:enable Magekwik_AttributeSetLimit
    bin/magento setup:upgrade
    bin/magento cache:flush

Usage

Once installed, the module automatically enforces a limit of 500 attributes per product attribute set. When attempting to add attributes beyond this limit via the admin panel or API, an error message will be displayed:

The attribute set cannot exceed 500 attributes.

Admin Panel

Navigate to Stores > Attributes > Attribute Set and edit an attribute set. The module checks the total number of attributes during save operations and prevents saving if the limit is exceeded. (in example we have used 60 as limit in Configuration Section)

Admin Panel Screenshot

API

When using the Magento API to assign attributes to a product attribute set (e.g., via Magento\Eav\Api\AttributeManagementInterface), the module will throw a LocalizedException if the limit is reached.

Configuration

The attribute limit is set to 500 by default and can be modified by updating the MAX_ATTRIBUTES_PER_SET constant in the following files:

  • Plugin/AttributeManagementPlugin.php
  • Plugin/AttributeSetPlugin.php

Ensure both constants are updated to maintain consistency.

Debugging

To verify the number of attributes in an attribute set:

  • Database Query: Run SELECT COUNT(*) FROM eav_entity_attribute WHERE attribute_set_id = <your_set_id>;.
  • Admin Panel: Manually count attributes in the attribute set edit page.
  • Logging: Enable logging in Plugin/AttributeSetPlugin.php by injecting \Psr\Log\LoggerInterface and logging $totalAttributes.

Compatibility

  • Magento Open Source: 2.4.x
  • Adobe Commerce: 2.4.x
  • PHP: 7.4, 8.0, 8.1

Support

For issues, feature requests, or contributions, please visit the GitHub repository or create an issue.

License

This module is licensed under the Open Software License 3.0 (OSL-3.0).

Author

Developed by Kanaka Kishore Kandregula, a Magento 2 Certified Developer with over 10 years of experience in e-commerce solutions.

Built for performance, reliability, and scalability.

magekwik/attribute-set-limit 适用场景与选型建议

magekwik/attribute-set-limit 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 1 次下载、GitHub Stars 达 2, 最近一次更新时间为 2025 年 08 月 16 日, 在 PHP 生态内属于活跃度较高的组件。

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

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

围绕 magekwik/attribute-set-limit 我们能提供哪些服务?
定制开发 / 二次开发

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

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: OSL-3.0
  • 更新时间: 2025-08-16